On Feb 25, 8:46 am, "simo" <simonbla...@hotmail.comwrote:
Is there a way of seeing whether a form is open or not in access 2000
using visual basic coding, as i want to transfer data from one form to
two different ones depending on which one is open.
Can anyone help
Simo!
You can create a function called isOpen:
Function isOpen(strName As String, _
Optional intObjectType As Variant = acForm)
' Returns True if strName is open, False otherwise.
' Assume the caller wants to know about a form.
isOpen = (SysCmd(acSysCmdGetObjectState, _
intObjectType, strName) <0)
End Function
Then you just check
If isOpen("ProgramName") Then