I’m trying to have a report where the user can specify a reporting period. I set up a form with a command button to run the report and two text boxes for the user to enter the start and end dates. Then I added the following parameter in the date field of the query that feeds the report:
>=[Forms]![frmRptMenu]![txtSDate] And >=[Forms]![frmRptMenu]![txtEdate]
When I tested this, I got strange results. The report calculates a total sum spent over the reporting period. For the last two quarters of 2011, the amount was more than double what it should have been. When I tried the first two quarters of 2012, it gave errors in every field.
I took out the parameter and ran the report, and it ran correctly. Then I went back to the query, and in the criterion row I put:
Between [Enter start date] And [Enter end date]
It gave me correct totals. I want to use text boxes on a menu to control user entry, so I don’t want to stick with the simple parameter.
What am I doing wrong?
Thanks,
Henry
>=[Forms]![frmRptMenu]![txtSDate] And >=[Forms]![frmRptMenu]![txtEdate]
When I tested this, I got strange results. The report calculates a total sum spent over the reporting period. For the last two quarters of 2011, the amount was more than double what it should have been. When I tried the first two quarters of 2012, it gave errors in every field.
I took out the parameter and ran the report, and it ran correctly. Then I went back to the query, and in the criterion row I put:
Between [Enter start date] And [Enter end date]
It gave me correct totals. I want to use text boxes on a menu to control user entry, so I don’t want to stick with the simple parameter.
What am I doing wrong?
Thanks,
Henry