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(acSysCmdGetObjectState, acForm, sForm) = acObjStateOpen Then
IsFormOpen = True
ElseIf Not SysCmd(acSysCmdGetObjectState, acForm, sForm) = acObjStateOpen Then
IsFormOpen = False
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.