Report Data Range

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

I created a form that has a date range:

FromDate
ToDate

After I enter both dates and generate a report. The report has 5
SubReports. It look great. When I click Print Icon, it pop up 5 times Date
Range from the queries not the form. How come? Did I do anything wrong
and your help would be appreciated.

Thanks
 
Hi,

I created a form that has a date range:

FromDate
ToDate

After I enter both dates and generate a report. The report has 5
SubReports. It look great. When I click Print Icon, it pop up 5 times Date
Range from the queries not the form. How come? Did I do anything wrong
and your help would be appreciated.

Thanks

The form must be open when the report is run.

Add a command button to the form. Code it's click event:
Me.Visible = False

The criteria in EACH query used in the report should use:
Between forms!FormName!FromDate and forms!FormName!ToDate

Open the Form from the Report's Open Event:
DoCmd.OpenForm "FormName", , , , , acDialog

Close the Form in the Report's Close event:
DoCmd.Close acForm, "FormName"

Run the report. The report will open the form. Enter the date range
and click the command button. The form will be hidden.
The Report will print or display.
When you close the report it will close the form.
 
Hi Bill,

I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to

let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng
Microsoft Developer Community Support
 
Back
Top