how do i apply a filter to a subform

S

Steve

Hello everyone,
I'm having a problem with loading a filter to apply to a subform:

My subform contains a query, which has a list of results. I want my user to
be able to further limit these results by applying a filter.
I can click "Filter by form" and create a filter, I can then save this
filter as a query. However, when i come to load the same filter and apply it
to the subform , it doesn't appear in the "Applicable filters" list, yet it
matches the requirements for doing so.

My user will be creating quite complex queries as filters, so it would be
useful if they could have the ability to load the filter they have created
previously.

This is becoming a major problem, as it's already taken up the better part
of a week of my time doing research on this problem.

If anyone can offer a solution, I would be most appreciative,

Steve
 
M

[MVP] S.Clark

From the main form:

Me!sfrmSubform.Form.Recordsource = "Select * from ..."

or

Me!sfrmSubform.Form.FilterBy = "Field1 = xyz"
Me!sfrmSubform.Form.FilterByOn = True

--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234
[email protected]
www.fmsinc.com/consulting
 
Top