By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 2,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

Combo Boxes and Selecting Everything in a Query

P: n/a
I have a form that is my criteria form. So, if a person enters a State
into the State combobox (ex. UT) then everything from that State will
appear when the user runs the query (based on the criteria entered into
the form).

I have 'All' as a category in the same combo box if the user wants to
see national information. But, it doesn't like 'All'. So, I've tried
"*" (asterisk). It still doesn't like it.

So, what type of information do I need to pass to the query that uses
the criteria in this form to get 'All' or everything?

Help?!

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Eliminate the criteria from the query, otherwise set the criteria not equal
to a value that cannot exist in that field.

"chfran" <ch****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a form that is my criteria form. So, if a person enters a State
into the State combobox (ex. UT) then everything from that State will
appear when the user runs the query (based on the criteria entered into
the form).

I have 'All' as a category in the same combo box if the user wants to
see national information. But, it doesn't like 'All'. So, I've tried
"*" (asterisk). It still doesn't like it.

So, what type of information do I need to pass to the query that uses
the criteria in this form to get 'All' or everything?

Help?!

Nov 13 '05 #2

P: n/a
chfran wrote:
I have a form that is my criteria form. So, if a person enters a State
into the State combobox (ex. UT) then everything from that State will
appear when the user runs the query (based on the criteria entered into
the form).

I have 'All' as a category in the same combo box if the user wants to
see national information. But, it doesn't like 'All'. So, I've tried
"*" (asterisk). It still doesn't like it.

So, what type of information do I need to pass to the query that uses
the criteria in this form to get 'All' or everything?

Help?!


A two column combo box with "*" and "ALL" in one record, state in both
columns for the others, set first column width to 0. Use "Like" in your
query's criteria and not "=".

--
[OO=00=OO]
Nov 13 '05 #3

P: n/a
I suspect your query has a where clause such as:
WHERE State = forms!CriteriaForm.cmbStates
if you use "like" instead of "=", like this:
WHERE State like forms!CriteriaForm.cmbStates
then it should work, since your state codes will be unique (you shouldn't
find the string "UT" inside any other state code, for example.) But it
wouldn't work so well if the values were less predictable.
This way, you can use "*" for the 'All' category.
"chfran" <ch****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a form that is my criteria form. So, if a person enters a State
into the State combobox (ex. UT) then everything from that State will
appear when the user runs the query (based on the criteria entered into
the form).

I have 'All' as a category in the same combo box if the user wants to
see national information. But, it doesn't like 'All'. So, I've tried
"*" (asterisk). It still doesn't like it.

So, what type of information do I need to pass to the query that uses
the criteria in this form to get 'All' or everything?

Help?!

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.