Query issues (noob question inside)

SirStevie3

Registered User.
Local time
Today, 11:42
Joined
Jul 29, 2013
Messages
58
Hello, I'm a self taught Access user. Needless to say i know nothing about macros or VBA or SQL or pretty much any other acronym.

I've been learning how to do everything by asking google and this forum seems to come up alot, so when i asked a question google couldnt asnwer i figured i'd join.

anyway, here is my issue (or rather, my learning hurdle):

I have a query which is run from a form via a command button. On this form i have a couple control sources (not sure if this is the correct term, but i have text boxes and drop down lists which the query uses in its criteria).

Everything works fine except i can't figure out how to filter my checkbox field (aka MyDeliv). I'd like to have a drop down box with 3 options: "yes", "no", and "ignore". i would like "yes" to return only records with the MyDeliv box checked, "no" to return only records with the MyDeliv box unchecked, and "ignore" to return records regardless of the MyDeliv checkbox.

can anyone help me solve this using expressions in the query builder? i do not understand VBA, SQL, or macros. Thanks so much!
 
You should try to start to understand all of this.
At this time the only solution seems to be to upload the database.
ZIP it before.

And WELCOME to the forum !
 
I can't upload it due to contractual restrictions :(
 
SirStevie3,
I think you'll need to run two queries. I'm not sure how you're doing this, but you can run one query without any criteria on your checkbox field if you value is "Ignore" and then a second query if the value is <> Ignore and write the query with an IIF in the the criteria, like this: SELECT (list of fields) FROM (table) WHERE MyDeliv=IIF[param]="Yes",True,False), and replace param with name of your control on the form.
Not sure if this helps.
 

Users who are viewing this thread

Back
Top Bottom