Prompt for dates for query

G

Guest

I know how to use a form to prompt for user parameters for a report that is
executed from a command button on the main screen (executable). However can
I, and how, us a form, or a prompt of some sort to have the user enter two
dates, that then feed to the query and execute it? From there the user will
save the results as a *.csv file.
 
L

Lynn Trapp

Add something like this to the query behind your report:

WHERE YourTableDatefield >= Forms!YourForm!YourBeginningDate AND
YourTableDateField <= Forms!YourForm!YourEndingDate

I know how to use a form to prompt for user parameters for a report that is
executed from a command button on the main screen (executable). However can
I, and how, us a form, or a prompt of some sort to have the user enter two
dates, that then feed to the query and execute it? From there the user will
save the results as a *.csv file.
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
 
S

Steve

Put the following expression in the criteria of your date field:
Between [Enter Beginning Date] And [Enter Ending Date]

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top