M
Mark
Is there a way to find out if a table is open? something similar to
currentproject.AllForms("MyFormName").IsLoaded
Thanks,
-Mark
currentproject.AllForms("MyFormName").IsLoaded
Thanks,
-Mark
George Nicholson said:DoCmd.OpenTable strTableName, acViewNormal
Do While MyIsLoaded(strTableName,acTable)
' pause code until table is closed
DoEvents
Loop
'(In a general module)
Public Function MyIsLoaded(strObjName As String, Optional lngObjType As
acObjecttype = acForm) As Boolean
' Returns True if strName is Open (non-zero), False(0) otherwise.
' Should return 0, not an error, if the object doesn't exist
' Default Object is Form
On Error Resume Next
MyIsLoaded = (SysCmd(acSysCmdGetObjectState, lngObjType, strObjName) <>
0)
End Function