Report with parameters from a form

  • Thread starter Thread starter Aneta123
  • Start date Start date
A

Aneta123

Guest
I have a report that runs off a paramater based query. The parameter is a date range. I use a form with 2 Microsoft Date and Time Picker ActiveXCtl’s, which allow for selecting a start and end date from a drop-down calendar.

The query that drives the report uses:
code:
Between Forms![frmDatePicker]![StartingDate] And Forms![frmDatePicker]![EndingDate]

I also display the date range at the top of the report.

For some reason the selected starting date is not picked up correctly. For instance, when I select 1/4/04 as a starting date, the report skips 1/4/04 and starts with displaying data for 1/5/04 (despite the fact that I have records for 1/4/04). If I select 1/5/04 it starts with 1/6/04, and so on.

The date range at the top of the report displays correctly.

However, when I open the report directly and enter the parameters in a parameter dialog box, everything works fine.

Can anyone please help me?
Thank you,
Aneta
 
Try this see if it's what you want

RptDate => Forms![frmDatePicker]![StartingDate] And
RptDate =<Forms![frmDatePicker]![EndingDate]

Peter

Update:

I just read from other threads that if your date fields contain pure dates without time elements then "Between...And " will include both start dates and end dates.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom