Specify "ALL" criteria

AnnPhil

Registered User.
Local time
Today, 23:07
Joined
Dec 18, 2001
Messages
246
I have several reports and have built a form to select the report i need and then also select which county to run the report on. My combo box list each county and then "ALL" for all counties.

My problem, the report does not know what to do when i select All from the combo box. The report is based on a query that has reference to the combo box in the county field. It works fine when i select a county. I know i need something else to make this work but dont know what it is. Can anyone help?

Example, my reports will vary as to which county if not all are needed each time the report is generated. Maybe there is a better way.


Thanks for any help
 
Just an idea but how about making your combobox contain 2 columns. The first is the one seen by the user with the list of counties and also with the choice ALL, the second has the counties but * for all

ForUser, Hidden
ALL *
Hampshire Hampshire
etc.

Now make the query take the info from the second column

HTH
 
The solutions database CD contains details of how to select "All" in a ComboBox. Also, this was covered a few months back as it is quite a popular question- have a search and see if you can find anything.

If not, post back again.

Col
 
Thanks for all your replies, however I still couldn't get it to work with the * idea. Colin you mention the Solutions db, how do i find that? I thought it was on my computer with the tradewind samples but when i did a search it didn't come up. I also did a search on this site for my question, although there were 231 hits i didn't find any that talked about this. What am i doing wrong?

Any help is appreciated, Thanks again
 
Hang in there Ann - I'll get back to you - have to do something else first. The solutions Db is on a seperate CD not part of Northwind Db

Col
 
Presume that you have something in your query like:

Field [County]
=Forms![MyForm]![cmbBox1]

Try =Iif(Forms![MyForm]![cmbBox1]="ALL",[County],Forms![MyForm]![cmbBox1])

Where [County] is the name of the field in the query

HTH
 
It's actually "Developer Solutions" and is available from the MS Download center
 
Thanks everyone for your help, i did get it to work using Harry second suggestion. Works great! I will take alook at the solutions db on the web site. Thanks again to everyone for your help.
 

Users who are viewing this thread

Back
Top Bottom