Query based on Check Box


S

stretch

I have a query that uses multiple criteria entered into a form. The user is
able to search using any of a number of fields to find records from a table.

I have the following example expression for numerous fields in the criteria
of the query;

Criteria: Like [Forms]![search enquiries]![Quoted By] & "*"
or: Is Null

This works fine but i now want it to return records based on if some
checkboxes are ticked as well.
What would be the criteria in the query for the fields with checkboxes, to
allow this to work?

Thanks in advance
 
Ad

Advertisements

J

Jerry Whittle

Checkboxes are usually Yes/No data types. Yes or No will work but don't put
quotation marks around them. Better yet 0 means No and -1 means Yes in Access
Yes/No data type fields. Something like below would find No records.

AND [Forms]![search enquiries]![YesNo] = 0
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


stretch said:
I have a query that uses multiple criteria entered into a form. The user is
able to search using any of a number of fields to find records from a table.

I have the following example expression for numerous fields in the criteria
of the query;

Criteria: Like [Forms]![search enquiries]![Quoted By] & "*"
or: Is Null

This works fine but i now want it to return records based on if some
checkboxes are ticked as well.
What would be the criteria in the query for the fields with checkboxes, to
allow this to work?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top