GoToControl

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

Guest

I would like to move to another combo box (text4) after update and in case no
changes are made would like to go to same combobox on exit. Used the
following code, but receive error message that focus can not be moved to
control text4 (Run-time error 2110)

Please help

Option Compare Database

Private Sub Text_AfterUpdate()
DoCmd.GoToControl "Text4"
End Sub

Private Sub Text_Exit(Cancel As Integer)
DoCmd.GoToControl "Text4"
End Sub
 
try changing the AfterUpdate code to

Private Sub Text_AfterUpdate()
On Error Resume Next
DoCmd.GoToControl "Text4"
End Sub

hth
 
Thanks for the help. It worked. Sorry about the multi post. Should have known
to read the rules first but what can you expect of a beginner. Thanks again.
 
you're welcome :)


skchth said:
Thanks for the help. It worked. Sorry about the multi post. Should have known
to read the rules first but what can you expect of a beginner. Thanks again.
 
Back
Top