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

Date Range Reports?

Status
Not open for further replies.

MJWilson0675

Technical User
May 1, 2003
3
US
I have a table that I would like to create a report that is filtered by a date range.

The table does have a date field, but how do i go about making the report?

I am sure I have to build a query first but what constraints to I need to filter by "from" - "to" dates.
 
Build a query which includes the date field you wish to report on and use: Between [Enter the Start date] And [Enter the End date] as the entry in the date field criteria.
I use two textboxes on my calling form in which I enter the dates that are relevant to what I want - if you format the textboxes as date fields then these can be used straight into the criteria:

Between Forms!frmCaller!StartDate And Forms!frmCaller!EndDate.
 
Just create a query using the following as an example:

Select A.*
FROM tblYourTableName as A
WHERE (((A.YourDateField) Between [Enter Beginning Date] And [Enter Ending Date]));

After updating this SQL with your Table name and date field name and saving it you can then update the Record Source of your report with this querys name.

The query will prompt for the beginning and ending dates when the report is run.

Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top