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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi tab forms

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am building a multi tab form and was wondering if it is possible to place the command buttons out side of the tab area, so that there is only one set of command buttons, rather than command buttons on each tab?
 
Of course.<br>Keep in mind that fields on TABs only work with one datasource on the main form.<br>You cannot specify different data sources for each TAB.<br>If you want each tab to display data from differnt Tables then you have to put subforms on each TAB connected to the different datasources.<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Each tab can have a separate datasource. Just add them via a subform. You do not need to have a &quot;Parent&quot; recordsource. Of course each tab will show all the records for that record source unless you filter it on the subform.
 
If I were you, I would set a variable that would hold the current page index of the tab control.&nbsp;&nbsp;That way, given the page that is being displayed, you can determine the action that needs to be done next.&nbsp;&nbsp;You should declare a variable at the form level, initialize it at onOpen event to the default index,(0).&nbsp;&nbsp;&nbsp;Each time the user changes the page the tabcontrol index should be set to the page index.&nbsp;&nbsp;When you Call the routine which does the next action you simply have to pass the tabControl's page index the determine what action needs to be done next.<br><br>Public sub MyAction(intPageIndex as integer) <br><br>Select Case intPageIndex<br>&nbsp;&nbsp;&nbsp;&nbsp;Case 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Some action<br>&nbsp;&nbsp;&nbsp;&nbsp;Case 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Some action<br>&nbsp;&nbsp;&nbsp;&nbsp;Case 2 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Some Action<br>&nbsp;&nbsp;&nbsp;&nbsp;Case Else<br><br>End Select<br><br>End function<br><br>From this you can determine what can be shown on your page or what the ensuing report would look like or whatever.&nbsp;&nbsp;I hope this helps.<br><br>Bob B.<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top