How do I tell the application to look and see what form it has open?
I want to tell it this:
If Forms!frmLTCRCases is Open Then . . .
Seems like a pretty basic question but I'm having trouble today --- its
Monday.
TIA
S. Jackson
What version of Access?
Access 2002:
If Not CurrentProject.AllForms("frmLTCRCases").IsLoaded Then
Do something here
Else
Do something else
End If
==============
In Access 97, copy this function (from the Northwind.mdb sample
database) into a Module.
Function IsLoaded(ByVal strFormName As String) As Integer
' Returns True if the specified form is open in Form view or
Datasheet
view.
Const conObjStateClosed = 0
Const conDesignView = 0
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If
End Function
===========
Then code an event:
If Not IsLoaded("frmLTCRCases") Then
Do this
Else
Do that
End if