help with * in a query

J

joseph atie

Currently I have a form with a bunch of unbound combo
boxes. These are populated and repopulated as required,
these link in with a query, and the output of the query
is displayed in combo box with multiple cols

Now the query is fine, it works as required, but what I
want to do is allow users to ignore one or more input
boxes by giving them the option to choose an *.

This option breaks the query. Instead of returning the
expected results in returns nothing, any suggestions,
according to access help * is the wildcard for any
possible character combination.

n.b as long as i dont use the * options everything
functions as expected, but i want to give my users this
functionality trivial as it maybe
 
J

John Vinson

This option breaks the query. Instead of returning the
expected results in returns nothing, any suggestions,
according to access help * is the wildcard for any
possible character combination.

The default "equals" operator doesn't know anything about wildcards.
You must use the LIKE operator to have an * treated as a wildcard -
i.e.

LIKE Forms!formname!comboname

Better, you can either have an ALL or a null option in the combo and
use a criterion of

([field] = Forms!formname!comboname OR Forms!formname!comboname =
"All")

or

([field] = Forms!formname!comboname OR Forms!formname!comboname IS
NULL)

respectively; it'll be more efficient than the LIKE.
 
L

Liz

Are the users using the * in every parameter request or
only some, and if they aren't using it in every parameter
request, what are the entering/not entering in the other
input boxes?
 

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

Top