Set date range in report

T

talib

In my access 2000 database i have a report that is run
quarterly. It has numerous fields that to calculate based
on different date fields, e.g., referral date, admission
date and discharge date. Every quarter I have to go in
and manually change the date range for each of these
fields. I would like to be able to change the date range,
e.g., ddate between #mm/dd/yyyy# and #mm/dd/yyyy#, one
time for the entire report. I know there is a way to
define a field in VB but I don't know how to complete this
task. I hope this makes sense. Thanks
 
L

Larry Daugherty

Hi Talib,

I suggest that you launch your report from a new form. On that form you'll
have a textbox for BeginningDate and another textbox for EndingDate. Use a
command button to launch the report while leaving the form loaded. In the
query for the report put

Between forms!myform!BeginningDate And forms!myform!EndingDate

in a criteria line for each relevant date field in your report.

HTH
 
L

Larry Daugherty

I forgot to add that you'll probably want validation code in the Click event
of the command button to verify that both text boxes have entries.
 
Top