View Full Version : Using Logic in query


alktrigger
06-11-2009, 06:41 AM
I currently have a combobox set up in a form which the query references to sort through data. I am looking to create a checkbox that will let the query show all results. How can I set up the criteria in the query to accomodate this or will I need to create a second query and activate it when the box is checked?

HiTechCoach
06-11-2009, 06:46 AM
If the field you are using the criteria with will always have a value then you could something like:

Where ( ([myfield] = forms!frmMyFormName.cboMyComboboxName) or (forms!frmMyFormName.chkMyCheckbox = true) )

alktrigger
06-11-2009, 06:54 AM
Thank you,
I was stuck thinking in If-Then terms. problem solved

HiTechCoach
06-11-2009, 09:57 AM
You're welcome!

Glad that it worked for you. :)