Wait for an object to close ... (1 Viewer)

Status
Not open for further replies.

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:12
Joined
Sep 12, 2006
Messages
15,614
this function will test whether an object is open. default is form, but use acreport etc, to test a report. Use with doevents so

Code:
while isopen("myform")
doevents
wend

or 

while isopen("myreport",acreport)
doevents
wend


Code:
Function IsOpen(strName As String, Optional objtype As Integer = acForm)
    IsOpen = (SysCmd(acSysCmdGetObjectState, objtype, strName) <> 0)
End Function
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom