Check box Crosstab Query

douglasjoh

New Member
Joined
Nov 17, 2016
Messages
15
Hello all,

Looking for some help/advice regarding the database I am currently trying to build.

In the crosstab query that I have created I am trying to filter this through the use of check boxes on a form.

I have tried to do this by entering the following iif statement - IIf([Forms]![MPS]![Check18]=True,0,1) in the criteria row of the stage column in my Crosstab query.

However, when trying to run I am presented with the following error message "The Microsoft Access database engine does not recognise '[Forms]![MPS]![Check18]' as a valid field name or expression".

I believe this has something to do with the parameters, however, I am unsure how to set them.

Any help would be greatly appreciated.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Crosstab queries require you to declare the parameter...

If you set up the parameter first from the Design tab on the Ribbon you should be able to use the parameter in the criteria expression.
 
Upvote 0
I'm not 100% sure - might work without explicit declaration - but either way you need to have the form open. A common mistake is to run such a query with the form not open. Otherwise check the field names.

Also since the form value is a check box already (true or false) you could forgo the IIF() formula.

Also, since you mention check boxes (plural) make sure you have correctly identified the problem field.

Note that since you are saying this is a criteria, you need to be comparing it to something that is 0 or 1 (which is a little strange to me, since MSAccess stores true and false as -1 and 0 ... another possible source of errors).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,042
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top