Hello,
I have a form with a combo box and two text boxes. Depending on the selection the user makes I want the cursor to move to one of the text box.
Action (combo box) Current_CHL (text box) New_CHL (text box)
Add - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > >
Change - - - - - - - - - - - - - > > > - - - - - - - - - - - - > > >
Drop - - - - - - - - - - - - - - > > >
I have this code attached to the Action Combo:
The "Add" and "Drop" works, but for some reason, I can't figure out why the "Change" not working. It goes to the New_CHL not the Current_CHL. I have the tab stops for both New_CHL and Current_CHL set to no.
Can someone help me out, thanks.
I have a form with a combo box and two text boxes. Depending on the selection the user makes I want the cursor to move to one of the text box.
Action (combo box) Current_CHL (text box) New_CHL (text box)
Add - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > >
Change - - - - - - - - - - - - - > > > - - - - - - - - - - - - > > >
Drop - - - - - - - - - - - - - - > > >
I have this code attached to the Action Combo:
Code:
Private Sub Action_AfterUpdate()
If Me.Action = "Add" Then
Me.New_CHL.SetFocus
ElseIf Me.Action = "Change" Then
Me.Current_CHL.SetFocus
Me.New_CHL.SetFocus
ElseIf Me.Action = "Drop" Then
Me.Current_CHL.SetFocus
End If
End Sub
The "Add" and "Drop" works, but for some reason, I can't figure out why the "Change" not working. It goes to the New_CHL not the Current_CHL. I have the tab stops for both New_CHL and Current_CHL set to no.
Can someone help me out, thanks.