J
Jack
Function IsObjectOpen(strName As String, Optional intObjectType As Integer =
acForm) As Boolean
' acForm (value 2) Default
On Error Resume Next
IsObjectOpen = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) <> 0)
If Err <> 0 Then
IsObjectOpen = False
End If
End Function
I have the above function to check for if a form is loaded or not.
I have the following query as a combo
box row source utilizing the above function
SELECT dbo_globaladdresslist_final_absolute.Row_id,
dbo_globaladdresslist_final_absolute.ActualName
FROM dbo_globaladdresslist_final_absolute
WHERE
(((dbo_globaladdresslist_final_absolute.displayname)=IIf((IsObjectOpen("frmActionRequestFiltered",2)),[Forms]![frmActionRequestFiltered]![cboAssignedTo],[Forms]![frmActionRequest]![cboAssignedTo])));
However the above query is not working I am not sure where I am going wrong.
I appreciate any help for resolution of this issue.
Thanks
acForm) As Boolean
' acForm (value 2) Default
On Error Resume Next
IsObjectOpen = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) <> 0)
If Err <> 0 Then
IsObjectOpen = False
End If
End Function
I have the above function to check for if a form is loaded or not.
I have the following query as a combo
box row source utilizing the above function
SELECT dbo_globaladdresslist_final_absolute.Row_id,
dbo_globaladdresslist_final_absolute.ActualName
FROM dbo_globaladdresslist_final_absolute
WHERE
(((dbo_globaladdresslist_final_absolute.displayname)=IIf((IsObjectOpen("frmActionRequestFiltered",2)),[Forms]![frmActionRequestFiltered]![cboAssignedTo],[Forms]![frmActionRequest]![cboAssignedTo])));
However the above query is not working I am not sure where I am going wrong.
I appreciate any help for resolution of this issue.
Thanks