Hi,
I'm using access 97 SR2 on win XP and keep getting the Sub or Function
not defined error message.
The code for the function is in a module called mod_Public and is as
follows.
Function IsLoaded(MyForm Name As String)
' Determines if a form is loaded.
Const FORM_DESIGN = 0
Dim I As Integer
IsLoaded = False
For I = 0 To Forms.Count - 1
If Forms(I).FormNa me = MyFormName Then
If Forms(I).Curren tView <> FORM_DESIGN Then
IsLoaded = True
Exit Function
End If
End If
Next
End Function
I'm trying to run the module in the on close event of another form.
This code is as follows.
Private Sub Form_Close()
If IsLoaded("ERA") = True Then
Forms![ERA]![ctl_Tab]!Cmbo_BuildingI d.Requery
End If
End Sub
Can anyone see what I am doing wrong?
Regards
Steve
I'm using access 97 SR2 on win XP and keep getting the Sub or Function
not defined error message.
The code for the function is in a module called mod_Public and is as
follows.
Function IsLoaded(MyForm Name As String)
' Determines if a form is loaded.
Const FORM_DESIGN = 0
Dim I As Integer
IsLoaded = False
For I = 0 To Forms.Count - 1
If Forms(I).FormNa me = MyFormName Then
If Forms(I).Curren tView <> FORM_DESIGN Then
IsLoaded = True
Exit Function
End If
End If
Next
End Function
I'm trying to run the module in the on close event of another form.
This code is as follows.
Private Sub Form_Close()
If IsLoaded("ERA") = True Then
Forms![ERA]![ctl_Tab]!Cmbo_BuildingI d.Requery
End If
End Sub
Can anyone see what I am doing wrong?
Regards
Steve
Comment