combo box selection

niccig

Registered User.
Local time
Yesterday, 17:26
Joined
Sep 8, 2004
Messages
29
I'm wanting to use a combo box to select the query criteria for opening a form. I want a combo box that gets it's values from the DateImported field in tbPayDetails. When you select a date, it uses that as the query criteria and returns all records from tbPayDetails that were imported on that date. The problem I have is that as there are multiple records with the same date, I get these multiple options in the combo box. Eg. 50 records imported on 9/29/04, 50 records on 8/29/04, where I just want one occurence of the date to be listed in the combo box. Is it possible to do this, or do I need a separate table that lists the import dates and just that table for the combo box source.
Any suggestions or advice greatly appreciated.
 
SELECT DISTINCT DateImported FROM tbPayDetails
 
Thanks - another question

Perfect - thanks so much.
Here's another combo question. I actually want to use several combo boxes for the user to select the record/s they want to view.
The combo boxes will be:
DateImported (thanks it now works)
PayPeriodEnd (use Select Distinct works like a charm)
ID (combo box shows perosn's ID and name from tbRA)

Must the user make a selection in each combo box? Sometimes just one selection will take them to the correct records. So is it possible to leave some combo boxes empty or do I need an "all option" for each combo box.

Thanks in advance
 
Last edited:
One way would be to use this technique in the query:

http://www.mvps.org/access/queries/qry0001.htm

Another would be to filter the records dynamically, testing each combo to see if a choice was made, and responding accordingly. That's probably what I'd do, but it's a little more complicated to set up.
 
Thanks Paul - I'll try the technique you suggested. The easy route may be the best option.
 

Users who are viewing this thread

Back
Top Bottom