View Full Version : Adding (All) to Combo Box


Natasha
01-03-2002, 05:36 AM
I have a form in my DB which shows the following :

Date From(listbox), Date To(listbox), Country(combo), Area(combo).

Once data is selected in these fields, a report is run based on a query.

On occasions, I would like to run the report for all area's or all countries, so I have added (all) into the 2 combo boxes using a union query.

However, my limited understanding of Access has meant I've had to create multiple queries in case either/both/neither of the Combo's is All.
e.g.
Query 1 - Area <> All and Country <> All
Query 2 - Area = All and Country = All
Query 3 - Area = All and Country <> All
Query 4 - Area <> All and Country = All

Is this the correct way to do it, or is there a better way.

Please e-mail me if this isn't clear.

Thanks for any help you can give.

Natasha.

Jack Cowley
01-03-2002, 09:39 AM
This article will show you how to build a 'dynamic' query so you will not have to have 4 separate queries.

http://support.microsoft.com/support/kb/articles/Q210/2/42.ASP?LN=EN-US&SD=gn&FR=0&qry=QBF&rnk=2&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000

Natasha
01-08-2002, 06:33 AM
Thanks very much for your response Jack.

That now works a treat !

Natasha.