I filter report on open based on form w/ Customer, and Dates from/to
On Open procedure :
Private Sub Report_Open(cancel As Integer)
' Set public variable to true to indicate that the report
' is in the Open event
bInReportOpenEvent = True
' Open Sales By Category Dialog
DoCmd.OpenForm "Range", , , , , acDialog
' Cancel Report if User Clicked the Cancel Button
If IsLoaded("Range") = False Then cancel = True
' Set public variable to false to indicate that the
' Open event is completed
bInReportOpenEvent = False
End Sub
Returns "Compile Error" on Cancel Button
"Ambiguous Name"
I have no idea why this happens? Any clues?