Read the filter info for a subform

  • Thread starter Thread starter Dave the wave
  • Start date Start date
D

Dave the wave

Using VBA, how can I read the present filter status and value of a subform.
In the object browser I am able to see the subform, filter status, and
filter string, but I can not figure out the proper syntax. i.e.
me.forms[subformname].filteron.

Is there a handy tool for relating VBA syntax to the Object browser? It
doesn't appear to be the same. (The filter value for the subform is viewable
using the object browser but if I follow the same object hierarchy I can not
find the property so I can read its value.)
 
Forms!MainForm!SubformCONTROL.Form.Filter

and

Forms!MainForm!SubformCONTROL.Form.FilterOn

Note that the SubformCONTROL name may be different from the name of the Form
you used as the Subform.

You can use "Me" instead of "Forms!MainForm" if the conde is run in the
context of the main Form.
 
Back
Top