Report by date

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi,

I have created a query. Based on this query I would like to pull a report. I
have also created a form which asks the user to input the start date and end
date for the report. However when the report is printed it outputs the
entire database.

What am I doing wrong?

Andy
 
Andy,
The query behind your report should be using the Start and End date values (from the
form) as a filter agianst the associated date field/s in the query. Your "dialog" form
should remain Open while the report previews/prints.
You didn't mention whether your query has a seperate Start and End Date, or just one
Date... I'm assuming just one date...

Criteria...
Between Forms!frmYourFormName!StartDate AND Forms!frmYourFormName!EndDate
 
The query has a separate Start and End Date. Where do I enter the code you
have given me?
In the property of the Preview button?

Anguel
 
Anguel,
You wrote...What I posted wasn't really "code"... it was a Criteria for the query behind your
report.

Since you have two individual Dates in your query. (use your own names)
StartDate
Criteria... >= Forms!frmYourFormName!StartDate

End Date
Criteria <=Forms!frmYourFormName!EndDate

Since this is an AND condition, the criterias for each field should be on the same line
in the query.
 
Back
Top