Access Filter Subform in Access 2007

Joined
Jun 14, 2011
Messages
3
Reaction score
0
Hi All,

I have a main form with a subform. The subform has several fields, one of which is details. When I open the main form, I want the subform to show the records with the letters REC in them. The Ref field on the main form and the Ref field on the subform are linked, and the subform uses a different table than the main form.

Can anybody help? I've spent hours trying to get this to work, I believe the ApplyFilter doesn't work on a subform.

Many thanks

NoviceBoy
 
Hi All,

I have seen a similar post where the solution was provided by Allen Browne here

https://www.pcreview.co.uk/forums/filters-and-subforms-t1139175.html

but I still can't get this to work.

The solution contains the following

With Me.[NameOfYourSubformHere].Form
.Filter = "Surname = ""Jones"""
.FilterOn = True
End With

Does anybody know where I put this code - is it On Current on the main form?


Pulling my hair out, any help most appreciated.
 
Back
Top