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

Reporting on a date range

Status
Not open for further replies.

laina222

Technical User
Sep 7, 2001
172
US
I have a report created, and what I'd like to do is be able to enter a start date and an end date at the beginning of each week, and have the report display records that only satisfy my requirements. Is there a feature that will allow me to do this so when I click on the report, a message box appears and asks me to fill in the date range and the report will only report on that range I indicated?
 
Is the report's record source a query?? If so, enter something like this in the criteria box of your date field:
Code:
Between [Enter Start Date] and [Enter End Date]
This will prompt you for the two dates.....
 
What if my report is based on totals and I have too many fields to enter in a query? I tried to create a query based on the table I use for the report, and I have way too many fields to enter in the query. Is there a way around this?
 
Sure, create an unbound text box and enter the above syntax, but like this:
Code:
"Between " & [Enter Start Date] & " and " & [Enter End Date]
This will prompt you for the dates and appear on the report just as you entered it. If you don't want it to be on the report, set the Visible property to No.
 
When I enter that expression in the text box's control source (is that the right place to do this?), I get an error message indicating that there's a syntax error. I did enter the expression exactly as you typed it.
 
Yes, it should be in the text box's control source. I did a copy & paste to post the syntax from one of my databases. Try copying & pasting it into yours and let me know....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top