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

Between Dates

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi.
I am trying to create a report that pulls data from a table without using a query.
I want to attach the code to a button on a form.

The report has to be compiled between two dates from one field.
eg. I want a msg box to ask between which dates I would like the report.

Any sugestions would be appreciated.
Thanks,

Sadukar
 
Add 2 text control boxes for the dates on the form. Add a command button with the following code:

DOcmd.OpenReport "YourReport", acViewPreview, , "[RecordSourceDateField] Between #" & Me![FormDateField1] & "# AND #" & Me![FormDateField1] & "#"

Good luck! Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top