Filtering subform

M

marlon

HOw do i filter a subform using code ?
I've a checkbox on the main form when i enable it i want to filter the subform.

thanks for your assistance in advance
 
A

Allen Browne

Set the Filter and FilterOn properties of the form in the subform control.

Example:

With Me.[NameOfYourSubformControlHere].Form
.Filter = "Surname = """Smith"""
.FilterOn = True
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top