Set Focus to specific tab in tab form from another form

K

Kim

Hi,
I have looked for an answer, but the only answerI have found is in
conjection to another question. My knowledge is limited and I could not pull
the code I need.

I have a form. It has a label. I would like to click on the label and have
the user be directed to a page in another form with tabs. for example, they
go to page 1, the second tab in the form, which has the name of SpecialOps.
Am I using the wrong control. Should it be a command button.

Should I use VB or should I create a macro.
I have tried both. I have looked everywhere. Although I have seen code, none
of it works.
I tried
[Me].[TabCtMS].[Pages](1).[SetFocus] and several variations.
tab form name - QBF_Form
tab name - SpecOps or index 1

Than kyou.
Kim
 
S

Stuart McCall

Kim said:
Hi,
I have looked for an answer, but the only answerI have found is in
conjection to another question. My knowledge is limited and I could not
pull
the code I need.

I have a form. It has a label. I would like to click on the label and have
the user be directed to a page in another form with tabs. for example,
they
go to page 1, the second tab in the form, which has the name of
SpecialOps.
Am I using the wrong control. Should it be a command button.

Should I use VB or should I create a macro.
I have tried both. I have looked everywhere. Although I have seen code,
none
of it works.
I tried
[Me].[TabCtMS].[Pages](1).[SetFocus] and several variations.
tab form name - QBF_Form
tab name - SpecOps or index 1

Than kyou.
Kim

All you have to do is first open the form, then set the input focus to the
first control in the required page. If the control is called MyControl,
then:

DoCmd.OpenForm "MyFormName"
Forms!MyFormName!MyControl.SetFocus
 
R

ruralguy via AccessMonster.com

This link might help:
http://www.mvps.org/access/forms/frm0031.htm
Hi,
I have looked for an answer, but the only answerI have found is in
conjection to another question. My knowledge is limited and I could not pull
the code I need.

I have a form. It has a label. I would like to click on the label and have
the user be directed to a page in another form with tabs. for example, they
go to page 1, the second tab in the form, which has the name of SpecialOps.
Am I using the wrong control. Should it be a command button.

Should I use VB or should I create a macro.
I have tried both. I have looked everywhere. Although I have seen code, none
of it works.
I tried
[Me].[TabCtMS].[Pages](1).[SetFocus] and several variations.
tab form name - QBF_Form
tab name - SpecOps or index 1

Than kyou.
Kim
 
K

Kim

Thank you very much.
I was so confused I had every piece of code I'd see all jumbled up together.
It worked and I was able to set up all of the other tabs. Thank you again.
Kim

Stuart McCall said:
Kim said:
Hi,
I have looked for an answer, but the only answerI have found is in
conjection to another question. My knowledge is limited and I could not
pull
the code I need.

I have a form. It has a label. I would like to click on the label and have
the user be directed to a page in another form with tabs. for example,
they
go to page 1, the second tab in the form, which has the name of
SpecialOps.
Am I using the wrong control. Should it be a command button.

Should I use VB or should I create a macro.
I have tried both. I have looked everywhere. Although I have seen code,
none
of it works.
I tried
[Me].[TabCtMS].[Pages](1).[SetFocus] and several variations.
tab form name - QBF_Form
tab name - SpecOps or index 1

Than kyou.
Kim

All you have to do is first open the form, then set the input focus to the
first control in the required page. If the control is called MyControl,
then:

DoCmd.OpenForm "MyFormName"
Forms!MyFormName!MyControl.SetFocus
 

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