PSIUnit
asked on
Syscmd in Access
I am trying to determine if a form is open so i can perform a certain task. To do that i am running the syscmd. It works in certain places fine but not with this one scenario. This is the function i have set up.
Function IsFormOpen(sForm As String) As Boolean
If SysCmd(acSysCmdGetObjectSt ate, acForm, sForm) = acObjStateOpen Then
IsFormOpen = True
ElseIf Not SysCmd(acSysCmdGetObjectSt ate, acForm, sForm) = acObjStateOpen Then
IsFormOpen = False
End If
The acSysCmdGetObjectState is returning a value of 10? If i understood the help file does not even say that is an option?
here is the scenario
On Form A - Update form. Press a Button to :
Call Form B - Search form. Search Button
Calls Form C Search results form. Checks to see if B is open if yes closes Form B. this works
Append button on Form C checks to see if they have Form A still open. If yes then append data if No then msgbox. this does not work.
Any Idea's
Function IsFormOpen(sForm As String) As Boolean
If SysCmd(acSysCmdGetObjectSt
IsFormOpen = True
ElseIf Not SysCmd(acSysCmdGetObjectSt
IsFormOpen = False
End If
The acSysCmdGetObjectState is returning a value of 10? If i understood the help file does not even say that is an option?
here is the scenario
On Form A - Update form. Press a Button to :
Call Form B - Search form. Search Button
Calls Form C Search results form. Checks to see if B is open if yes closes Form B. this works
Append button on Form C checks to see if they have Form A still open. If yes then append data if No then msgbox. this does not work.
Any Idea's
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.