tab control problem

  • Thread starter noe1818 via AccessMonster.com
  • Start date
N

noe1818 via AccessMonster.com

I set up a series of automated tabs.

Ex. user hits a button, focus shifts to an unbound box in a tab. That unbound
box has a "on focus" macro that goes to an unbound box on a second tab, which
has a "on focus" macro that shifts focus to a third unbound box on a third
tab, etc. The problem becomes when I have more than one leap, an error
message comes up saying that I cannot change focus to the 1st unbound box.
The error message appears for every box in tries to access, but the focus
ends up where I want it to be.

My question is: was does it says this, but work anyways? (probably not the
best way, but I don't know code, so it's the best I've got)

(If you want to why I'm doing this, it so the user hits a button and a tab is
accessed, printed - using printout macro- and then focus is automatically
shifted to second tab, printed and then on the the third, etc.) The user
doesn't have to hit the print button for every tabpage. My sequence works for
tab pages, except when subforms are in the tab page, then this error message
appears.

Noe
 
K

Klatuu

Being a subform, the way you address it is a little different. Try:

Me.SubformControlName.Form.ControlToGetFocus

Where SubformControlName is the name of the subform control on your main
form, not the name of the form being used as a subform. The Word Form refers
to the form identified in the subform control's Source Object property.
Then, ControlToGetFocus is the name of the control you want to get the focus.
Use your real names, of course.
 
N

noe1818 via AccessMonster.com

Unfortunatley I don't code, so I used macros. But do you why the message is
coming up. Why can't you automatically tab more than once?
Klatuu said:
Being a subform, the way you address it is a little different. Try:

Me.SubformControlName.Form.ControlToGetFocus

Where SubformControlName is the name of the subform control on your main
form, not the name of the form being used as a subform. The Word Form refers
to the form identified in the subform control's Source Object property.
Then, ControlToGetFocus is the name of the control you want to get the focus.
Use your real names, of course.
I set up a series of automated tabs.
[quoted text clipped - 17 lines]
 
K

Klatuu

There is no limit to the number of times you can tab. You original post said
the error happens when the control is on a subform. If this is correct, that
is the problem.
--
Dave Hargis, Microsoft Access MVP


noe1818 via AccessMonster.com said:
Unfortunatley I don't code, so I used macros. But do you why the message is
coming up. Why can't you automatically tab more than once?
Klatuu said:
Being a subform, the way you address it is a little different. Try:

Me.SubformControlName.Form.ControlToGetFocus

Where SubformControlName is the name of the subform control on your main
form, not the name of the form being used as a subform. The Word Form refers
to the form identified in the subform control's Source Object property.
Then, ControlToGetFocus is the name of the control you want to get the focus.
Use your real names, of course.
I set up a series of automated tabs.
[quoted text clipped - 17 lines]
 
J

Jeanette Cunningham

Hi,
If you want to tab automatically from one control to the next, remove all
the code that sets focus to any other control.
Set the tab order for the subform in the order that you want the user to
move from one control to the next.
To set the tab order for the subform, click on the detail section of the
subform.
Go Alt + V + B to open the tab order selector.
Drag the controls on the list into the order that you want them.

Jeanette Cunningham


Klatuu said:
There is no limit to the number of times you can tab. You original post
said
the error happens when the control is on a subform. If this is correct,
that
is the problem.
--
Dave Hargis, Microsoft Access MVP


noe1818 via AccessMonster.com said:
Unfortunatley I don't code, so I used macros. But do you why the message
is
coming up. Why can't you automatically tab more than once?
Klatuu said:
Being a subform, the way you address it is a little different. Try:

Me.SubformControlName.Form.ControlToGetFocus

Where SubformControlName is the name of the subform control on your main
form, not the name of the form being used as a subform. The Word Form
refers
to the form identified in the subform control's Source Object property.
Then, ControlToGetFocus is the name of the control you want to get the
focus.
Use your real names, of course.
I set up a series of automated tabs.

[quoted text clipped - 17 lines]

Noe
 
J

Jeanette Cunningham

Hi,
If you want to tab automatically from one control to the next, remove all
the code that sets focus to any other control.
Set the tab order for the subform in the order that you want the user to
move from one control to the next.
To set the tab order for the subform, click on the detail section of the
subform.
Go Alt + V + B to open the tab order selector.
Drag the controls on the list into the order that you want them.

Jeanette Cunningham


Klatuu said:
There is no limit to the number of times you can tab. You original post
said
the error happens when the control is on a subform. If this is correct,
that
is the problem.
--
Dave Hargis, Microsoft Access MVP


noe1818 via AccessMonster.com said:
Unfortunatley I don't code, so I used macros. But do you why the message
is
coming up. Why can't you automatically tab more than once?
Klatuu said:
Being a subform, the way you address it is a little different. Try:

Me.SubformControlName.Form.ControlToGetFocus

Where SubformControlName is the name of the subform control on your main
form, not the name of the form being used as a subform. The Word Form
refers
to the form identified in the subform control's Source Object property.
Then, ControlToGetFocus is the name of the control you want to get the
focus.
Use your real names, of course.
I set up a series of automated tabs.

[quoted text clipped - 17 lines]

Noe
 
K

Klatuu

Correct, Jeanette, but that is not the issue. The OP it wanting to move from
control to control automatically without user intervention.
--
Dave Hargis, Microsoft Access MVP


Jeanette Cunningham said:
Hi,
If you want to tab automatically from one control to the next, remove all
the code that sets focus to any other control.
Set the tab order for the subform in the order that you want the user to
move from one control to the next.
To set the tab order for the subform, click on the detail section of the
subform.
Go Alt + V + B to open the tab order selector.
Drag the controls on the list into the order that you want them.

Jeanette Cunningham


Klatuu said:
There is no limit to the number of times you can tab. You original post
said
the error happens when the control is on a subform. If this is correct,
that
is the problem.
--
Dave Hargis, Microsoft Access MVP


noe1818 via AccessMonster.com said:
Unfortunatley I don't code, so I used macros. But do you why the message
is
coming up. Why can't you automatically tab more than once?
Klatuu wrote:
Being a subform, the way you address it is a little different. Try:

Me.SubformControlName.Form.ControlToGetFocus

Where SubformControlName is the name of the subform control on your main
form, not the name of the form being used as a subform. The Word Form
refers
to the form identified in the subform control's Source Object property.
Then, ControlToGetFocus is the name of the control you want to get the
focus.
Use your real names, of course.
I set up a series of automated tabs.

[quoted text clipped - 17 lines]

Noe
 
N

noe1818 via AccessMonster.com

That's not really my problem. I want to open my first tab then have it go to
my second, then my third all WITHOUT hitting another button. Kind of like a
domino effect, just by pressing a button once. Using macros you can "onfocus"
and use GoToRecord and select the next tab, then do the same thing on the
next tab, but if you try and chain more than one of these it gives you an
error message, but works anyways? I'm confused why this error message appears.


NB I don't know code language

Jeanette said:
Hi,
If you want to tab automatically from one control to the next, remove all
the code that sets focus to any other control.
Set the tab order for the subform in the order that you want the user to
move from one control to the next.
To set the tab order for the subform, click on the detail section of the
subform.
Go Alt + V + B to open the tab order selector.
Drag the controls on the list into the order that you want them.

Jeanette Cunningham
There is no limit to the number of times you can tab. You original post
said
[quoted text clipped - 21 lines]
 
K

Klatuu

Just had a thought. What is the purpose of automatically moving from control
to control? I really don't know of any reason to do that. Perhaps you could
describe what you are trying to do.
--
Dave Hargis, Microsoft Access MVP


noe1818 via AccessMonster.com said:
That's not really my problem. I want to open my first tab then have it go to
my second, then my third all WITHOUT hitting another button. Kind of like a
domino effect, just by pressing a button once. Using macros you can "onfocus"
and use GoToRecord and select the next tab, then do the same thing on the
next tab, but if you try and chain more than one of these it gives you an
error message, but works anyways? I'm confused why this error message appears.


NB I don't know code language

Jeanette said:
Hi,
If you want to tab automatically from one control to the next, remove all
the code that sets focus to any other control.
Set the tab order for the subform in the order that you want the user to
move from one control to the next.
To set the tab order for the subform, click on the detail section of the
subform.
Go Alt + V + B to open the tab order selector.
Drag the controls on the list into the order that you want them.

Jeanette Cunningham
There is no limit to the number of times you can tab. You original post
said
[quoted text clipped - 21 lines]
 
N

noe1818 via AccessMonster.com

I have a form that is supposed to be printed (I know reports better, but i'm
using forms -for the choice of what records are to be printed) So User goes
to the printing section of the db, and I want them to hit a button and all
the subforms (on a tab control) are printed for the selected record. So if I
have a command that accesses the first tab, prints, goes to the next tab,
prints then goes to next tab prints, etc, It will eliminate the user having
to select a tab and press print for each tab.

Each subform is on a tab page. I want to be able to print each subform from
each tag page automatically, that why I want to use the macros and the
GoToRecord, and PrintOut functions. It works but an error message happens
after the process is complete.

Noe
 

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