View Full Version : Wait for an object to close ...


gemma-the-husky
12-05-2006, 02:33 AM
this function will test whether an object is open. default is form, but use acreport etc, to test a report. Use with doevents so


while isopen("myform")
doevents
wend

or

while isopen("myreport",acreport)
doevents
wend




Function IsOpen(strName As String, Optional objtype As Integer = acForm)
IsOpen = (SysCmd(acSysCmdGetObjectState, objtype, strName) <> 0)
End Function