Hi,
I would like to run a parameter query. The parameter comes from a form control. However if the form is not open i would like to see all the results.
I have found a post that described a method based on a function
Function IsFormLoaded(strForm As String) As Boolean
Dim frm As Form
For Each frm In Forms
If frm.Name = "frmServiceEntry" Then
IsFormLoaded = True
Exit Function
End If
Next
End Function
and after this adding the following to the query
IIF(IsFormLoaded("frmServiceEntry"), Forms!frmServiceEntry.ServiceID, " ")
ServiceID is an integer. I do not get it worked. It always return the truepart.
Any idea what am i doing wrong?
Thanks
I would like to run a parameter query. The parameter comes from a form control. However if the form is not open i would like to see all the results.
I have found a post that described a method based on a function
Function IsFormLoaded(strForm As String) As Boolean
Dim frm As Form
For Each frm In Forms
If frm.Name = "frmServiceEntry" Then
IsFormLoaded = True
Exit Function
End If
Next
End Function
and after this adding the following to the query
IIF(IsFormLoaded("frmServiceEntry"), Forms!frmServiceEntry.ServiceID, " ")
ServiceID is an integer. I do not get it worked. It always return the truepart.
Any idea what am i doing wrong?
Thanks