The code below was clipped from Northwinds. When I run the report the form displays the single combo box. It allows me to select from the combo box and when I click the OK button, the main window for a report displays behind the still open Form and nothing happens beyond that.
All I can do at that point is click the Cancel button.
Any ideas where I may begin trying to determine the logic breakdown?
Private Sub Report_Open(Cancel As Integer)
' Open frmOrgLookup form.
' IsLoaded function (defined in Utility Functions module) determines
' if specified form is open.
Dim strDocName As String
strDocName = "frmOrgLookup_test"
' Set public variable to True so Sales by Year Dialog knows that report
' is in its Open event.
blnOpening = True
' Open form.
DoCmd.OpenForm strDocName, , , , , acDialog
' If frmOrgLookup form isn't loaded, don't preview or print report.
' (User clicked Cancel button on form.)
If IsLoaded(strDocName) = False Then Cancel = True
'Set public variable to False, signifying that Open event is finished.
blnOpening = False
End Sub
All I can do at that point is click the Cancel button.
Any ideas where I may begin trying to determine the logic breakdown?
Private Sub Report_Open(Cancel As Integer)
' Open frmOrgLookup form.
' IsLoaded function (defined in Utility Functions module) determines
' if specified form is open.
Dim strDocName As String
strDocName = "frmOrgLookup_test"
' Set public variable to True so Sales by Year Dialog knows that report
' is in its Open event.
blnOpening = True
' Open form.
DoCmd.OpenForm strDocName, , , , , acDialog
' If frmOrgLookup form isn't loaded, don't preview or print report.
' (User clicked Cancel button on form.)
If IsLoaded(strDocName) = False Then Cancel = True
'Set public variable to False, signifying that Open event is finished.
blnOpening = False
End Sub