473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Combo Boxes and Selecting Everything in a Query

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
3 1345
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
1
by: Dalan | last post by:
Sometime ago I had inserted two Combo Boxes on a form (cboCustomers) and (cboVendors) to lookup values in separate tables. They have worked fine except now I want to increase their usage by...
4
by: RBohannon | last post by:
I'm using Access 2000. I currently have a report being generated using the results of a query by form. The form used for this query is an unbound form, frmListDialog. frmListDialog contains...
0
by: Andrew | last post by:
Hello, I am trying to create a chart whose underlying query is linked to 2 combo boxes on the same form. I want to pass the values from the combo boxes into the chart query to allow the chart...
4
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
5
by: jjyconsulting | last post by:
Newbie needing some help. I have a tblParticipants. The fields include gender, education_level, income, occupation etc., I'm trying to create a form where a user can run a query from the form and...
5
by: consonanza | last post by:
I am working on a report filter form. It has 2 combo boxes (cmboSelectSubject and cmboSelectCategory) to select criteria. Selecting an entry in combo 1 restricts the options available in combo 2....
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
2
by: ARC | last post by:
I'm testing a user's db that contains a very large number of records. I have an invoice screen, with an invoice select dropdown box that shows all invoices, and the customer's name, etc. With...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.