How to use a wildcard to pull all values in a combobox?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I allow a user to not select a particular value from a combobox, but
rather (perhaps by entering a wildcard?) to pull all values from the
underlying query?
 
Hi, Kapila.

I'm not sure if I understand what you're asking, but if you're looking to
filter a query by a keyword anywhere in a given field, create two textboxes.
The first is for the keyword input. Set the Control Source of the other to
"*" & FirstComboBox & "*". I normally make the 2nd box invisible. Then in
your query, refer to the second textbox in the Criteria row:

Like Forms!YourForm!Your2ndTextbox

Hope that helps.
Sprinks
 
In the underlying query, add a second "or" criteria that reads
[Forms]![YourFormName]![combobox] is null.
If the value of the combo box is left blank, the query will return all
records.
If you are using the After Update event on the combo box to launch the
query, it may be easier to add a command button instead.
 
What i do on my for is to display text that blank means
all. below will return all record if the combobox is null.
Be carefull it will also allow for p[artial entries.
In you query's criteria put
[Forms]![NameOfForm]![NameOfCombox]&"*"

Chris
 
Back
Top