Date Range in a Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I would like to be able to print reports for a specific date range of
information. I have many queries set up, and there are subreports in my main
report that are based off of these queries. I have an unbound from to enter
my begin and end dates. My form name is frmReportCriteria and I have two
controls for begin and end date......ctlDateFrom and ctlDateTo. In my
queries, I have the following for date criteria: Between
[Forms]![frmReportCriteria]![ctlDateFrom] And
[Forms]![frmReportCriteria]![ctlDateTo]. When I go to run my main report, I
first enter the dates in the form and then open my main report. My main
report has no information in it.

Can anyone help me with why nothing shows up in my report? Thanks
 
Hello,

I would like to be able to print reports for a specific date range of
information. I have many queries set up, and there are subreports in my main
report that are based off of these queries. I have an unbound from to enter
my begin and end dates. My form name is frmReportCriteria and I have two
controls for begin and end date......ctlDateFrom and ctlDateTo. In my
queries, I have the following for date criteria: Between
[Forms]![frmReportCriteria]![ctlDateFrom] And
[Forms]![frmReportCriteria]![ctlDateTo]. When I go to run my main report, I
first enter the dates in the form and then open my main report. My main
report has no information in it.

Can anyone help me with why nothing shows up in my report? Thanks


*** Re: I first enter the dates in the form and then open my main
report. ***

Change the order of processing.

Code the Main Report's Open event.
DoCmd.OpenForm "frmReportCriteria", , , , , acDialog

Code the Main Report's Close event.
DoCmd.Close acForm , "frmReportCriteria"

On the frmReportCriteria, code a command button Click event:
Me.Visible = False

When ready, open the Report. It will open the form. Enter the date
parameters. Click on the form's Command button. The report will run.
When the report closes, it will close the form.
 
Back
Top