Query Parameter using multiple options

Sep 19, 2014
Reaction score

I have a form (based on a parameter query) that shows a combobox with 3 options:
1) return all records
2) return all records where field1 = ABC
3) return all records where field1 <> ABC

The user selects an option and then clicks a button to refresh the form/query results.
How do I properly pass the combobox criteria selection to the parameter query?

I've tried some code that updates the value of a hidden textbox based on the combobox selection . For example, if the user selects
combobox option 1 --> textbox.value = "*"
combobox option 2 --> textbox.value = "ABC"
combobox option 3 --> textbox.value = "<> ABC"

Then I set my query parameter to [forms]![form1]![textbox]

But...it doesn't work. Actually, option 2 works, but the others don't. What's the fix?


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