filtering same subform multiple times? (1 Viewer)

shrndegruv

Registered User.
Local time
Yesterday, 21:20
Joined
Sep 8, 2004
Messages
58
Hey all

simple question: is there any way to apply a different filter to a subform each time it appears on the main form?

I have a subform that would be awesome on multiple tabs of a large form, and Id like to apply a different filter on each tab....

Thanx in advance!

mike
 

llkhoutx

Registered User.
Local time
Yesterday, 23:20
Joined
Feb 26, 2001
Messages
4,018
Controls on tabs are controls of the form, therefor, you're going to have subform name problems if you put the same subform on each tab.

Merely put the subform on top of the tab control (make sure that there's nothing on the various tabs below it) and appropriately reset the subform filter on the TabChange event. Don't forget to set the subform filter appropriately when the form initially opens.

I used tab controls a long time before I stumbled onto the TabChange event.
 

shrndegruv

Registered User.
Local time
Yesterday, 21:20
Joined
Sep 8, 2004
Messages
58
Thanx for the reply -- The form is tabbed at the top level, there are no controls displayed across all tabs -- maybe that will have to change.

The real problem is that hte filter property applies to the form, not to each subform control. So applying a filter ot a subform in one area affects everywhere else that subform is displayed.
 

shrndegruv

Registered User.
Local time
Yesterday, 21:20
Joined
Sep 8, 2004
Messages
58
Restate:

I have one subform I want to use at different places on my main form, applying a different filter in each of the places I display it. It seems this cannot be done.
 

llkhoutx

Registered User.
Local time
Yesterday, 23:20
Joined
Feb 26, 2001
Messages
4,018
Yes it can be done. It sounds like a very bad design, especially if they are displayed simultaneously. If not, see myfirst post in the topic.
 

Users who are viewing this thread

Top Bottom