MS Access: Establish tab order between objects in tab control pages in Access 2003/XP/2000/97

To set the tab order between tab pages, you'll need to intervene with VBA code. We'll demonstrate how to do this with an example.

Below we have a form that has a tab control object with 2 tab pages - General and Shipping.



When we tab from the ShippedDate field on the General tab, we want to automatically move to the first field on the Shipping tab (ie: the ShipName field).



To do this, open your form in design view and select the Properties for the ShippedDate text box. Click on the property called "On Key Down". A button with 3 dots should appear to the right of this property. Click on this button.



When the Choose Builder window appears, highlight Code Builder. Click on the OK button.



This should bring up the Visual Basic editor:


Enter the following code:

If KeyCode = 9 Then
ShipName.SetFocus
End If

This code will check if the tab key (KeyCode =9) has been pressed. If the user types the tab key while being on the ShippedDate field on the General tab page, it will automatically set the focus to the ShipName field on the Shipping tab page. This will in essence, simulate a tab order between tab pages.

You can place similar VBA code on the last field on each of your tab pages to move the user to the first field on the next tab page.