Jim Lawrence (AccessD)
accessd at shaw.ca
Tue Apr 20 21:41:17 CDT 2004
Hi Susan:
... how would you prevent an error in the form? I suppose
I could just handle it and remind the user to open the form and ...
Private Sub Report_Open(Cancel As Integer)
If SysCmd(acSysCmdGetObjectState, acForm, "TheFormthatIwhat") <> 0 Then
If Forms("TheFormthatIwhat").CurrentView = 0 Then
MsgBox "Form Project must currently" & vbCr & _
"active to supply information.", vbExclamation, "Error..."
Cancel = True
End If
End If
End Function
Place code similar to this in the Report's Open event.
Jim