TabIndex Property Example

The following example reverses the tab order of a command button and a text box. Because TextBox1 was created first, it has a TabIndex property setting of 0 and Command1 has a setting of 1.

Sub Form_Click()
    Me!Command1.TabIndex = 0
    Me!TextBox1.TabIndex = 1
End Sub