Hi there,
I'm trying to add a Cancel Event to my macro that opens up 4 reports where the last 3 reports will take their criteria from the ID entered in when prompted with the first report. The problem is, I chose to cancel the event - I'll have to cancel the prompt for the next 3 reports which is why I'm trying to create a Cancel Event, which will just cancel the progression of opening the next 3 reports. However I have a module that checks that forms are open and I'm trying to work around it - any suggestions please - I didn't code the module, it was part of a procedure in creating a filter for a form Below is the code of the module:
Function IsLoaded(ByVal strFormName As String) As Boolean
Dim oAccessObject As AccessObject
Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
If oAccessObject.CurrentView <> acCurViewDesign Then
IsLoaded = True
End If
End If
End Function
It comes up with a "debug error" when I put in Cancel Event and highlights the
Set oAccessObject = CurrentProject.AllForms(strFormName)
part.
Any help greatly appreciated thanks