Tab order different when Finding -v- Adding?

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

Guest

I would like to set the tab order within a form differently for when adding a
new record, as opposed to when searching for/editing an existing record.
Is it possible to do this, or can there be only one tab order on a form
regardless of mode of use?
Thanks
CW
 
Private Sub cmdTest_Click()

If Me.txtOne.TabIndex = 0 Then
Me.txtThree.TabIndex = 0
Me.txtTwo.TabIndex = 1
Me.txtOne.TabIndex = 2
Me.txtThree.SetFocus
Else
Me.txtOne.TabIndex = 0
Me.txtTwo.TabIndex = 1
Me.txtThree.TabIndex = 2
Me.txtOne.SetFocus
End If
Me.cmdTest.TabIndex = 3

End Sub

In this example txtOne, txtTwo and txtThree are text boxes, cmdTest is a
command button.
 
Back
Top