Wayne Cramer
Registered User.
- Local time
- Yesterday, 21:26
- Joined
- Aug 10, 2007
- Messages
- 93
I have a report that I would like to pass parameter information by form. I have created the form and placed the parameter information in the query [Forms]![Form Name]![Field] and placed the following code in the open event of the report:
Private Sub Report_Open(Cancel As Integer)
bInReportOpenEvent = True
DoCmd.OpenForm "CMER", , , , , acDialog
bInReportOpenEvent = False
End Sub
The form works great and opens the query when I select a region manager. When I open the report it brings up the form...but when I enter the reion manager it opens the query but then brings up the parameter dialog asking for the regional manager again.
Another report using the same standards works perfectly. Well, almost perfectly. When the report is closed the query remains on the screen and has tyo be closed seperately - an annoiance to my users. Is there a way to close the underlying query with the report?
Private Sub Report_Open(Cancel As Integer)
bInReportOpenEvent = True
DoCmd.OpenForm "CMER", , , , , acDialog
bInReportOpenEvent = False
End Sub
The form works great and opens the query when I select a region manager. When I open the report it brings up the form...but when I enter the reion manager it opens the query but then brings up the parameter dialog asking for the regional manager again.
Another report using the same standards works perfectly. Well, almost perfectly. When the report is closed the query remains on the screen and has tyo be closed seperately - an annoiance to my users. Is there a way to close the underlying query with the report?