Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling Back all records from a Combo Box

Status
Not open for further replies.

DAldridge

Technical User
Jan 24, 2001
6
US
I am Using Access 97 and need to know how to Bring back all the records from a query using a combo Box whilst also keeping the ability to select seperate groups
 
Ok, I am trying to create a report that is run from a form. This form has a date range and a combo box on it to make it possible to select a single Courier and then report on all their deliveries. However I also want the facility to pull back all deliveries for all couriers as well and would like to know how to be able to pull couriers back singly or as a whole
 
Head over to The Access Web--Dev Ashish runs the site, and it's pretty doggone complete. You need two things: how to add "all" to a combo (go to search page, enter 'combo' and it should be one of the first items), then in the query you're using to return recs, I'm assuming you have something along the lines of

forms![formname].[comboname] in the criteria line associated with the combo. Put in

forms![formname].[comboname] or forms![formname].[comboname] is null

this is also on his site, if you search using the work Parameter.

HTH
Ben
 
What is the URL for The Access Web. I have tried searching for it but nothing is coming up

Cheers
Dave
 

You might also want to look up SQL UNION Queries.

For example:

SELECT DISTINCTROW Customers.Company, Customers.[Customer Number] FROM Customers UNION SELECT &quot;<ALL>&quot;,&quot;&quot; FROM Customers ORDER BY Customers.Company;

This would give you all customers and customer numbers and a row with &quot;<ALL>&quot; which would return all records.

Try downloading this sample db which has a lot of useful examples of combo/listboxes.


Good luck! B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top