Way to tell if user is filtering by form? (1 Viewer)

lution

Registered User.
Local time
Yesterday, 20:14
Joined
Mar 21, 2007
Messages
114
I have code in several methods on one of my forms. When the user filters by form, all the code fires and most doesn't need to since there isn't any data on the form as the user is putting in their filter information. Is there a way to tell if the form is open to do a filter by form? Regular filter is fine since there is data on the form but the empty form is giving me issues.

Thanks.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 09:14
Joined
May 7, 2009
Messages
19,231
you can test it when the form first opens
through the property FilterOnLoad.
If it is True and there is a Filter.


Private Sub Form_Open(Cancel As Integer)
MsgBox "Filter On Load: " & IIF(Me.FilterOnLoad, "True. Filter: " & Me.Filter, "False")
End If
 

Users who are viewing this thread

Top Bottom