Query criteria retrieved from a Form combobox?

blacksaibot

Registered User.
Local time
Today, 04:10
Joined
Jan 20, 2010
Messages
31
Right now on my form I have a comobox with 3 options.

The third option is an "all of the above" case.

The query takes the selection from the form combobox like so:

[forms]![formname]![comboboxname]

The problem is: I can't figure out how to tell it to take both option1 and option2 as the criteria when option3 is selected in the combobox.

My intial thought was to put an asterisk (*) because I remember back in my SQL days * meant "everything" but that won't work. any help? Thanks!

Also, how can I do the same thing but with a listbox that has a multiselect??
 
Try

Where fieldname=([forms]![formname]![comboboxname]) or [forms]![formname]![comboboxname]="all of the above")

in SQL view

Brian
 
Awesome. It worked. Thank you!
BTW sorry about the double post. I got an error when I first tried to post. I checked the forum to see if it went through, and it didn't. Guess there was some lag.


Any thoughts on the mutliselect list box?
Something tells me VBA might be involved, not 100% sure how I'd pull it off without (looping through the items that are selected)???
 

Users who are viewing this thread

Back
Top Bottom