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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

use a listbox and date range filter together

Status
Not open for further replies.

shazbot

MIS
Nov 20, 2000
25
0
0
US
Iam setting up a form that will open a report based on a query. I would like to set up a filter on the report using a list box to select one item from the list and then use date range criteria that the user will enter. For example, a report on customers who bought a certain product during a certain period of time. The user would select the product from a listbox and then enter the date range and open the report from a command button on the form. I am using code from Allan Browne that I found on the web for the date range part which is current ly working fine but I dont know how to incorporate the listbox criteria. I am a novice with Access and any coding that goes along with it, as you may have already guessed. Thank you.
 
Can you post the working code?
Name of the form with the listbox?
Name of the listbox?
and the table names and fields like:

tblDates
productID
startDate
endDate
....
 
Check out this FAQ faq181-5497. It will allow you to do what you want. Simply open a new module and copy the code from the FAQ and paste it into your new module. Then follow the directions in the Header of the FAQ. Basically, you use the Tag property of the list box and textboxes (date range) to make it work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top