[AccessD] Filter by Form stuff

Susan Harkins ssharkins at gmail.com
Tue Apr 15 19:52:14 CDT 2008



>
> I need to deduce whatever filter the user applies and then re-scope the
> "Finder" dropdowns to reflect this scope. I am at a loss for how to do 
> this.
> I already tried resetting the recordsouce and applying the filtered
> statement and nothing I've come up with works.

=======Arthur, I'm not really sure what you're looking for, but... 
acApplyfilter is the constant that represents the Filter-by-Form stuff. 
So...

Put the following in the General Declarations area (not entirely necessary 
depending on what you're doing:

Dim iFilterType as Integer

Enter the following in the Form's Apply Filter event:

iFiltertype = ApplyType

Then, try something like this in a click or after update event -- based on 
how you're filtering or what you're trying to do with the filter:

Dim frm As Form
Set frm = your form
If iFilterType = acApplyFilter Then
    Debug.Print frm.Filter
End If

I don't know what you want to do with this filter, but perhaps this will get 
you a cleaner string????

Susan H. 




More information about the AccessD mailing list