Arthur Fuller
fuller.artful at gmail.com
Tue Apr 15 21:06:01 CDT 2008
I tried that and what I got was bizarre. Assume that I have a pair of dropdowns that are record-selectors. They start out with rows for every record. Then the user elects to filter-by-form. Now I need to repopulate the dropdowns to contain only the matching rows. Let's say the original number of rows was 1000 and the new number of filtered rows is 100, because the user selected to filter by Region or something else, or some combination of values. When I inspect the me.filter value, it is weird and mentions something I have never encountered before. Its value begins with "Lookup_*", where "*" means anything you selected. It's easy enough to replace all this with a call to Replace() but I have to think there is a more intelligent way to do this. However I have never walked down this particular Access path so it's all new to me. Thanks for your help. I'm still working on ways to solve this one. Yours didn't work, but I'm still trying. A. On Tue, Apr 15, 2008 at 8:52 PM, Susan Harkins <ssharkins at gmail.com> wrote: > > > =======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. > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >