"Between" staement in Query: Need on Report

travismp

Registered User.
Local time
Today, 09:01
Joined
Oct 15, 2001
Messages
386
Hopefully simple - I have a query with this statement in a date based field:

Between [Enter Begin Date] And [End End Date]

I have a report pulling from this same query. I want the report to show the typed in date ranges. So if some one types in 1/1/2003 for begin and 12/31/2003 for the end date; I want these two date sets on the top of the report.

Should be easey for some one smarter than I. Thanks All.

TP
 
Instead of using the parameters in the query, create a form with the two text boxes for begin date and end date and a command button.

Then replace the
[Enter Begin Date] with Forms![Your Form Name].[Your Field Name]
[Enter End Date] with Forms![Your Form Name].[Your Field Name]
in the query.

By doing this you can use the form fields to qualify the dates (Make sure they are valid, make sure the end date is equal to or greater then the Begin date)

Add the code to launch the report to the command button.

You can then add the reference to these fields on this form to the Report (Same as the Query)
 
Add a text box to the report header and set the record source
as.

=" Week Of: " & [Enter Start Date] & " Thru " & [Enter End Date]


With "Week Of" being any text u want ie: Date Range etc.

Data in parenthesis must be same as in query
 
Last edited:
Thanks!

That last one did exactly what I wanted. Thanks capstar it worked perfect and saved me a bunch of time. You need to be bumped up to a higher member status!

tp
 
Between

Good tip. I've used it and it work fine.
 

Users who are viewing this thread

Back
Top Bottom