Tabs and filters - help

Pennie

Registered User.
Local time
Today, 20:42
Joined
Aug 21, 2002
Messages
11
I have a form with tab controls in it. This is what I want to do.

The first tab shows all members, the second tab shows members that belong to group "a" only,
the third tab shows members belonging to group "b" only.

I know a need a filter but how do I attach the filter to each tab? I don't know VB code so could someone show me an example please?

The tab and form is attached to a query which is made of one "members" table and another "addresses" table. The tables are linked via property address_id.

Also where does one find the On Change event for a tab? My tab properties window shows On Click, On DblClick, On Mouse Down, On Mouse Move, On Mouse Up only.

Thank you very much

Pennie :confused:
 
One way ( sounds a bit complicated but isn't really).

Make a subform that shows all members.

Place this on your form and then move it so it lies over your tab control - but is NOT placed on any of the tab pages. Size as necessary.

The reason for doing this is that the subform will 'lie on top' of the tab control and be visible whichever page of the tab control is selected.

Now all you have to do is to alter the RecordSource of the subform according to which tab page you select.

Assume you have a series of queries already prepared that filter by "A", "B" etc (qryA, qryB ...) and that the subform is mnamed MembersSub and the main form is named Members ...

In the On Change event for the tab control ...
(named MyTabCtl, say)

Select case MyTabCtl
 
oops! pressed the wrong key - sorry ... to continue:

One way ( sounds a bit complicated but isn't really).

Make a subform that shows all members.

Place this on your form and then move it so it lies over your tab control - but is NOT placed on any of the tab pages. Size as necessary.

The reason for doing this is that the subform will 'lie on top' of the tab control and be visible whichever page of the tab control is selected.

Now all you have to do is to alter the RecordSource of the subform according to which tab page you select.

Assume you have a series of queries already prepared that filter by "A", "B" etc (qryA, qryB ...) and that the subform is named MembersSub and the main form is named Members ...

In the On Change event for the tab control ...
(named MyTabCtl, say)

Select case MyTabCtl

Case 0 'this is the first tab page
Me!MembersSub.Form.RecordSource = "qryFullList"
Case 1 'second tab page
Me!MembersSub.Form.RecordSource = "qryA"

etc

End Select

HTH

Jeff
 
tabs etc.

Thaks very much for your help. I'll try it now :-)
 

Users who are viewing this thread

Back
Top Bottom