Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering on sub form

Status
Not open for further replies.

4321z

Programmer
Oct 21, 2003
45
GB
Trying to apply a filter to a sub form - thats based on a query, by using the Docmd.applyfilter
but access thinks i'm trying to apply the filter to the parent form which is not linked to any query or table and tells me of this,

any suggestions?

 
You could try to use the .filter and .filteron properties of the subform.

For instance something like this from the main form:

[tt]Me!SubControlName.Form.Filter = "yourfilter"
Me!SubControlName.Form.FilterOn = True [/tt]

SubControlName - the subform control name, which might differ from the name of the subform as viewed in the database window, replace "yourfilter" with your current filter.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top