programming the Tab Key

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi All,

I have a main form with text boxes and in the main form, I
also have subforms that have text boxes too. How can I
program the "TAB" key to go to the text box in sequence
from one text box to the next and from the last text box
in the main form to the text box in the subform. Any
suggestion??

Thanks for the help...

Mike
 
Hi,

If you design your form and then select whichever field you would like
to start from. Select Properties and choose the TabIndex. Set this to
1 and then sequentially through all your fields. When the user is
Tabbing in the Form they will be moved from Field to Field in the
correct sequence.

Hope this helps
Mark
 
It works. Thanks
-----Original Message-----
Hi,

If you design your form and then select whichever field you would like
to start from. Select Properties and choose the TabIndex. Set this to
1 and then sequentially through all your fields. When the user is
Tabbing in the Form they will be moved from Field to Field in the
correct sequence.

Hope this helps
Mark



------------------------------------------------
 
It works once and it didn't work again. When I press the
tab key the next time I open the form, it jumps around and
did not stay in sequence. Any clue why?? and how to progam
it so it stays in sequence..

Thanks,

mike
-----Original Message-----
Hi,

If you design your form and then select whichever field you would like
to start from. Select Properties and choose the TabIndex. Set this to
1 and then sequentially through all your fields. When the user is
Tabbing in the Form they will be moved from Field to Field in the
correct sequence.

Hope this helps
Mark



------------------------------------------------
 
Each control has a TabIndex and a TabStop property. Tab indexes ranges from
0 to how ever many controls that has the TabStop Property set to True.
Therefore, the first control to get the focus should have the TabIndex
Property set to 0 and the TabStop Property set to True. If you are working
with Access 2002 or Access 2003, you can also click on the Tab Index
Property, then click on the 3 dots button on the right of the property,
which then a dialog box will pop up and allow you to set the order of all
controls that currently has their TabStop Property set to True.

One other Property on each of these control to pay attention to is the
EnterKeyBehavior Property as that may also be impacted how going from field
to field is impacted. If this property is set to "Default" which it is by
default, it will do as how it's set to behave based on the Enter Key
Behavior setting within Tools>Options>Keyboard>Move after enter

Now, if you have a command button on the form with it's "Default" Property
set to True, and the EnterKeyBehavior is set to True, instead of the enter
key doing how it's set in the Options, it will execute the command button's
Click Event of the command button that has it's Default Property set to
True. Note, only one command button on the form can have it's Default
Property set to True just as there can only be one command button on the
form can have it's Cancel Property set to False, which is triggered by
hitting the "Esc" key.

I could have sworn, textboxes has a TabKeyBehavior Property too, but I don't
see it in Access 2002. However, that may be in Access 97. If it is there,
then you will want to check that out too. There is a help file of it in
Access 2002, but yet, no textbox object in Access 2002 seems to have it.
 
Back
Top