Modifying Tab Order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am a completely new user of Access trying to modify what I think is the tab order of an existing database.

The database tracks scores for archers during an archery tournament. There are 3 archers on each target. The archers shoot 6 arrows, score them and then the score for the three archers on each target are entered into the database. Then they repeat that process 6 times.

The database is setup to show the three archers on each target one above the other and there are 6 slots to input the scores, so it looks like this.

Target #1
archer 1 score 1 score 2 score 3 score 4 score 5 score 6
archer 2 score 1 score 2 score 3 score 4 score 5 score 6
archer 3 score 1 score 2 score 3 score 4 score 5 score 6

At the moment the tab order is set to go horizontally from score 1 to score 2 etc for each archer.

I want the tab order to go from archer 1 score 1 to archer 2 score 1 to archer 3 score 1 and then to start over again with archer 1 score 2 etc.

When I look at the form in design view, I only see the fields for one archer. The database is able to figure out that on target 1 there are 3 archers and when I ask for target 2, it wll list 3 different archers.

So the tab order goes horizontally instead of vertically. How can I change that?

Thanks for your suggestions.

Joan
 
With the form in design view there are 2 ways to change this.

1) Open the properties sheet and click on each control (textbox) in turn. On
the Other tab, there will be a tab index property. Set it as desired. The
tab order is from 0 to the number of controls -1 in sequence. If you fill in
a number that is already in use, Access will automatically move the
remaining contols' tab orders down one.

2) Go to View|Tab Order... and in the dialog box drag the objects to the
order desired.

--
Wayne Morgan
MS Access MVP


Joan McDonald said:
I am a completely new user of Access trying to modify what I think is the
tab order of an existing database.
The database tracks scores for archers during an archery tournament.
There are 3 archers on each target. The archers shoot 6 arrows, score them
and then the score for the three archers on each target are entered into the
database. Then they repeat that process 6 times.
The database is setup to show the three archers on each target one above
the other and there are 6 slots to input the scores, so it looks like this.
Target #1
archer 1 score 1 score 2 score 3 score 4 score 5 score 6
archer 2 score 1 score 2 score 3 score 4 score 5 score 6
archer 3 score 1 score 2 score 3 score 4 score 5 score 6

At the moment the tab order is set to go horizontally from score 1 to score 2 etc for each archer.

I want the tab order to go from archer 1 score 1 to archer 2 score 1
to archer 3 score 1 and then to start over again with archer 1 score 2
etc.
When I look at the form in design view, I only see the fields for one
archer. The database is able to figure out that on target 1 there are 3
archers and when I ask for target 2, it wll list 3 different archers.
 
Hi Wayne - thanks for your response. The problem is that in design view there is only one row of controls i.e. score 1, score 2 etc laid out horizontally. The only way you can set the tab order is horizontally. But when you run the program to input scores, it brings up three people on each target (which is correct) - now the tab order goes horizontally from score 1 to score 2 to score 3 etc. instead of going down from archer 1 score 1, then archer 2 score 1 etc.

In design view you can't set the order to go down......only to the right.
 
Hi Joan,

I'm missing some information to understand what you need or want. Are you enterering the scores direct in a table or do you have a form where you enter the scores and want to move between the fields in the form?

Tab order can't be changed to browse in a table => use the cursors instead. You can change it for the Enter key in Options - Keyboard.

Forms: you can specify the tab order for the fields in the form. If you right click on the top right corner of the form in design modus you will get a menue with item 'Tab order'.
 
It sounds as if this is a subform on the main form and is returning 3
records, so you are needing to move from record to record, not tab. One
thing you may want to try is setting the Move On Enter option in
Tools|Options|Keyboard tab to Next Record. This will cause you to move to
the next record when pressing Enter. Another option would be to use Page
Down to move down the records then Ctrl+Home to return to the first record.
You could also use the Exit event of the control. If you are at the last
record, MoveFirst, else MoveNext. If you MoveFirst you would also set the
focus to the next control.

Example:
Private Sub txtMyTextbox_LostFocus()
If Me.Recordset.AbsolutePosition + 1 = Me.Recordset.RecordCount Then
Me.Recordset.MoveFirst
Me.txtNextTextbox.SetFocus
Else
Me.Recordset.MoveNext
End If
End Sub

You would need to do this for each of the score textboxes except the last
one.

--
Wayne Morgan
MS Access MVP


Joan McDonald said:
Hi Wayne - thanks for your response. The problem is that in design view
there is only one row of controls i.e. score 1, score 2 etc laid out
horizontally. The only way you can set the tab order is horizontally. But
when you run the program to input scores, it brings up three people on each
target (which is correct) - now the tab order goes horizontally from score 1
to score 2 to score 3 etc. instead of going down from archer 1 score 1, then
archer 2 score 1 etc.
 
Hi Bernard.....

sorry I should have said that I am trying to modify the tab order in a form (it's actually a sub form). When you enter the data in the form you select the target number which then brings up the three archers on that target so that you can enter the scores. So on the form you see all three archers for that particular target. But when you go to design view you only see one row with the fields for one archer. I can select the fields and set the tab order, but because there is only one row of fields, I can only set the tab order to go to the right. I can't set them to go down to archer two because there isn't a second line of fields.

I hope tis helps.

thanks for your help
Joan
 
Alright......this is definitely progress.....You are of course correct, I want to move to the next record. So setting the "Move after enter" to "Next record" does the trick.

So...nxt question - the code that you kindly gave me will move from the last record back to the first record and change the focus to the next field. My question is where do I put this code?

Thanks again for your patience - my only access experience is with trying to modify this database - and with the help files - so I'm kind of pleased I got this far!!

thanks again
Joan
 
The code should work in the Exit or LostFocus event of the textboxes. I had
tried it in the LostFocus event.

--
Wayne Morgan
MS Access MVP


Joan McDonald said:
Alright......this is definitely progress.....You are of course correct, I
want to move to the next record. So setting the "Move after enter" to "Next
record" does the trick.
So...nxt question - the code that you kindly gave me will move from the
last record back to the first record and change the focus to the next field.
My question is where do I put this code?
Thanks again for your patience - my only access experience is with trying
to modify this database - and with the help files - so I'm kind of pleased I
got this far!!
 
Back
Top