When a form is first created, the order of the fields determines the initial tab order. Even when you reposition the fields on a form, the form's tab order remains the same. For example, the tab order shown in is from when the form was originally created. Because you have rearranged several controls, the tab order no longer reflects the order in which the fields appear on the form, as shown in figure. This isn't really a big problem, since it's easy to change the tab order.
The tab order determines the order by which you advance from one field to the next when you press Tab.
Even when you reposition fields on a form, the tab order remains the same.
Changing the tab order.
To change the tab order for a form select View » Tab Order from the menu. The will appear, as shown in figure. From here all you have to do is click and drag the field in the order you want. Or you can click the Auto Order button, which automatically rearranges the tab order to correspond with the order in which controls appear on the form.
-
Make sure that you have the frmFirstForm form open.
First let's see the current tab order of the frmFirstForm form.
-
Switch to Form view by clicking the View button on the .
Go to the next step and see what happens when you try tabbing through the fields on the form.
-
Press the Tab key several times.
When you press the Tab key, the cursor jumps from the CustomerID field to the LastName field to the... Phone field? The tab order for the frmFirstForm form was determined when the form was created. You may have moved the Phone name field in the previous lesson, but its position in the tab order hasn't changed.
You can view and change the tab order by opening the Tab Order dialog box. First you need to be in Design view.
-
Click the View button on the Form Design toolbar to switch to Design view.
Here's how to display the Tab Order dialog box.
-
Select View » Tab Order from the menu.
The Tab Order dialog box appears, as shown in figure. The order of the fields in the list is the order in which you will advance from one field to the next when you press the Tab key. There are a couple of ways to change the tab order. The fast and easy way is to click the Auto Order button, which automatically rearranges the tab order to correspond with the order in which controls appear on the form.
The initial tab order of a form and the Auto Order option both create a tab order from left to right, top to bottom.
-
Click the Auto Order button.
Access looks at the order in which fields appear on the form and adjusts the tab order accordingly.
Sometimes the tab order may not be intuitive for data entry and you may want to manually change it. For example, you may want to modify the tab order so that the address, city, state, and Zip Code fields are together. Here's how to manually change a field's position in the tab order.
-
Click the City row selector in the Custom Order list.
Now that you have selected the City row you can change its order by dragging it to a new location in the list.
-
Drag the City row until it is below the Address row, as shown in figure, then release the mouse button.
Move on to the next step and finish arranging the fields in the tab order.
-
Drag the State row below the City row and drag the ZipCode row below the State row.
You're finished changing the tab order for the frmFirstForm form.
-
Click OK to close the Tab Order dialog box.
Let's test the new tab order.
-
Switch to Form View by clicking the View button on the Form Design toolbar. Press the Tab key several times and notice the order in which the cursor moves from field to field.
You've finished this lesson so...
-
Save your changes and then close the frmFirstForm form.
How to change a form's tab order:
-
display the form in design view.
-
select view » tab order from the menu.
-
click the row selector for the control you want to move.
-
click and drag the row selector to the desired location.
-
repeat steps 3 and 4 to change the order of additional controls.
to automatically change the tab order:
-
display the form in design view.
-
select view » tab order from the menu.
-
click the auto order button to automatically reorder the form controls, based on their position in the form.