Tab Control

C

Chris

My main form has a tab control that also has a subform. I wish to add a
command button on the TabControl *outside* of the subform. I cannot figure
out the code reference for that control's click event.

main form: [frm1 Client]
tab control: [tabMisc]
suboform: [sfrmMisc]

Where can I find this code? It seems that normal references (as in
subforms) do not work. My messages are either method improper or cannot find
the control.

Help! Please!
 
M

Marshall Barton

Chris said:
My main form has a tab control that also has a subform. I wish to add a
command button on the TabControl *outside* of the subform. I cannot figure
out the code reference for that control's click event.

main form: [frm1 Client]
tab control: [tabMisc]
suboform: [sfrmMisc]

Where can I find this code? It seems that normal references (as in
subforms) do not work. My messages are either method improper or cannot find
the control.


A control on a tab page is referenced the same as any other
control on the form. The tab control part of the question
does not make a difference.
 
J

John W. Vinson

My main form has a tab control that also has a subform. I wish to add a
command button on the TabControl *outside* of the subform. I cannot figure
out the code reference for that control's click event.

main form: [frm1 Client]
tab control: [tabMisc]
suboform: [sfrmMisc]

Where can I find this code? It seems that normal references (as in
subforms) do not work. My messages are either method improper or cannot find
the control.

Help! Please!

The tab control is absolutely irrelevant to control references. The controls
on a tab page are - logically - on the form where that tab control resides.
The code for the command button will be in [frm1 Client]'s module, under the
name

Private Sub commandbuttonname_Click()

End Sub

The code will, of course, not exist until you write it. The command button
needs to be created first (by selecting the desired Tab Page and adding a
button control from the toolbox); and then you can select the button, view its
Properties, and click the ... icon by its Click event.

John W. Vinson [MVP]
 
C

Chris

Thanks for the response.

It may not to you...it sure does to me. I cannot find the correct referring
code. Anything I try does not work. I do not make my living at this.
--
Thanks for your help,
Chris


Marshall Barton said:
Chris said:
My main form has a tab control that also has a subform. I wish to add a
command button on the TabControl *outside* of the subform. I cannot figure
out the code reference for that control's click event.

main form: [frm1 Client]
tab control: [tabMisc]
suboform: [sfrmMisc]

Where can I find this code? It seems that normal references (as in
subforms) do not work. My messages are either method improper or cannot find
the control.


A control on a tab page is referenced the same as any other
control on the form. The tab control part of the question
does not make a difference.
 
C

Chris

Thanks John....your explanation verified what I thought and I looked further.
I had a name issue that was confusing.
--
Thanks for your help,
Chris


John W. Vinson said:
My main form has a tab control that also has a subform. I wish to add a
command button on the TabControl *outside* of the subform. I cannot figure
out the code reference for that control's click event.

main form: [frm1 Client]
tab control: [tabMisc]
suboform: [sfrmMisc]

Where can I find this code? It seems that normal references (as in
subforms) do not work. My messages are either method improper or cannot find
the control.

Help! Please!

The tab control is absolutely irrelevant to control references. The controls
on a tab page are - logically - on the form where that tab control resides.
The code for the command button will be in [frm1 Client]'s module, under the
name

Private Sub commandbuttonname_Click()

End Sub

The code will, of course, not exist until you write it. The command button
needs to be created first (by selecting the desired Tab Page and adding a
button control from the toolbox); and then you can select the button, view its
Properties, and click the ... icon by its Click event.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top