GoToControl

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
 
T

tina

try changing the AfterUpdate code to

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

hth
 
G

Guest

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.
 
T

tina

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top