Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 form under multiple tabs

Status
Not open for further replies.

Darrylles

Programmer
Feb 7, 2002
1,758
GB
I have a form (formA) with a tab-control on it with 6 tabs.

frmB is on the tab-control under each tab.

When a tab is clicked, I want to change the frmB's recordsource to display relevant info. for that tab.

So, formA has myTabControl, the tab control has 6 tabs, each tab has a differently named sub-form container
each holding formB.

How do I refer to the recordsource property of frmB and set it to a specific query, dependant on which tab
is clicked?

I currently have 6 identical forms instead of one single frmB, which is a nightmare when it comes to adding
additional functionality.

Any help appreciated.

ATB

Darrylles


Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
Forms!yourMainForm![sub-form container].Form.RecordSource = ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV - works great.

Also, I needed to use the <on change> event of the tabControl itself and test it's value for 0,1,2,3 etc to find the actual tab that had been clicked.

I had been attempting to use the 'tab' <on click> event.

(The tab-control ain't a very intuitive control to use!)

ATB

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top