Filtering a SubForm

gpurger

Registered User.
Local time
Today, 09:49
Joined
Apr 21, 2004
Messages
66
I have a sub form to which I want to apply filter buttons.
I have used the wizard to set these up.
The problem I have is that when I try to filter the SubForm the MainForm also filters.
The forms are based on tables and not queries.

Cheers

Gordon
 
How adept are you at visual basic programming? Behind each of the buttons the wizard sets up is an on_click event that triggers a few lines of code, which enable the filtering action to happen. Chances are these buttons are filtering both the form and sub form because the code is not specific to only the subform. If you can post the code here I can give you the corrections to make that should solve the problem.

If you are not adept with visual basic simply open the form is design view, go to the properties box for the filter button you want to change, and scroll down to "On Click". This property should say [event procedure], and have the builder icon next to it (the box with three dots). Click this box and the code window should pop up and the cursor should be at the start of the procedure for the buttons action. Just copy and paste that here and I'll see what I can do.
 

Users who are viewing this thread

Back
Top Bottom