If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Switch between subforms using a button
Dear all,
I've got one main form and two subforms. I'd like to switch between subforms using a button (instead of tabs, I have my reasons for that). Main form: frmMain Subforms: frmSub1 and frmSub2 Location of subform label on main form: lblLocationSubform Location of subform on main form: formLocationSubform So far, I only succeeded in letting the button change the label, by using lblLocationSubform.Caption = "This title appears above the subform" What additional code do I need for letting the button change the subform itself too? The solution is probably very easy, but I just don't know in what direction I should be looking. I was thinking of using something like formLocationSubform.Form.Something = Forms!frmSub1 Could one of you please help me out? |
#2
|
|||
|
|||
Switch between subforms using a button
Solved it in the meantime by using
Me.formLocationSubform.SourceObject = "frmSub1" But thanks anyway! :-) |
Thread Tools | |
Display Modes | |
|
|