ajetrumpet
Banned
- Local time
- Today, 14:20
- Joined
- Jun 22, 2007
- Messages
- 5,638
Is my form loaded/open? (VBA check)
This works on any type of object in the database:
The system command built-in function from MS works wonders. here it is:
Here are the object types for the second argument:
This works on any type of object in the database:
The system command built-in function from MS works wonders. here it is:
PHP:
Function GetObjState(strName String, strType As Long) As String
dim ObjState as long
ObjState = SysCmd(acSysCmdGetObjectState, strType, strName)
if ObjState = 0 then
' The object is closed.
GetObjState = "Closed"
elseif ObjState = 1 then
' The object is open.
GetObjState = "Open"
elseif ObjState = 2 then
' The object has been modified
GetObjState = "Modified and UnSaved"
end if
msgbox GetObjState
end function
PHP:
form = 2
function = 10
macro = 4
module = 5
query = 1
report = 3
table = 0
Last edited: