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

Date parameters -MS Access 2003 Form Design 1

Status
Not open for further replies.

RHorton1976

Technical User
Aug 20, 2008
8
GB
Hello everyone,

I want to design a form in Access which is to be used for reporting on a database with data spanning over several years. I want to be able to select the from date and to date from a drop down list for the month and the year, select the query from a list and then run it.

How do I design this date parameter functionality?

Any suggestions would be greatly appreciated.

Thanks!
 
I'd create a form with two textboxes, date from and date to.
Then on the OnClick event of the textoboxes have a calendar appear. You can use the Calendar Control or Datepicker that comes with Access or use:
The Accessory Calendar Control Mimic
If you have Access 2007, if you make the textboxes have a format of Date/time, then, I think, this function is all ready done for you.
Then you would have a command button to run the report. The report would have the query has its record source.
In your query, you'd have under the date field a parameter prompt for the criteria using the Between function. eg.
Between Forms![Formname]![DateFrom] And forms![Formname]![DateTo]

You can search the Access forums for code or look it up in any standard Access book.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top