Using tab control tool to add 2 or more subforms

  • Thread starter Thread starter Omar
  • Start date Start date
O

Omar

First thank you for reading this note..

I used the tab control tool to insert 3 different subforms
within a main form. I would like to add an option group
within the main form that would toggle between these
subform. I believe the way its done is using the option
value number but Im not knowledgeable enough to figure out
how. Thanks for any posting
 
First thank you for reading this note..

I used the tab control tool to insert 3 different subforms
within a main form. I would like to add an option group
within the main form that would toggle between these
subform. I believe the way its done is using the option
value number but Im not knowledgeable enough to figure out
how. Thanks for any posting

I'm a bit puzzled as to why you would want to do this. A Tab Control
has tab pages with a labeled tab on each one; if you put one subform
on each of three pages you already HAVE the functionality of just
clicking on one of three tabs. What do you gain by duplicating that
functionality in another control?

You can do it, of course; set up the Option Group with three buttons
with values matching the three Tabs. In the Option Group's afterupdate
event put code like

Private Sub optOpenPage_AfterUpdate
Me!pgPageControl.TabIndex = Me!optOpenPage
End Sub
 
This may help

Private Sub Combo34_AfterUpdate()

With Me

.Combo34.SetFocus
.CreditControl_Subform.Visible = True
.WaitingPayment.Visible = False
.Command33.Enabled = False
Select Case .Combo34.Text
Case "Over Due Accounts"

.Command33.Enabled = False
.WaitingPayment.Visible = False
.CreditControl_Subform.Visible = True
Case "All unpaid accounts"

.Command33.Enabled = True
.CreditControl_Subform.Visible = False
.WaitingPayment.Visible = True
End Select
End With
End Sub

where the select case is change it to the name of the option group of your 3
optionbuttons i.e(the frame)

then every time you use the word case you put the index number of the
optionbutton.

call this sub in each option buttons click
 
Back
Top