How to force a tab stop

RenaG

Registered User.
Local time
Today, 16:08
Joined
Mar 29, 2011
Messages
166
I am trying to control where the cursor lands when the user presses the tab key based on what was entered in the field they are currently on. I looked through other posts to see if an answer had already been posted. What I came up with was to Set the Focus on the field I want to go to. The only problem with that is, SetFocus is not given as an option in the auto-fill drop down (I guess that is what you call it) for that field. This is what I tried to use:
Private Sub answerID_LostFocus()
If Me.answerID = "Other" Then
Me.rText.SetFocus
End If
End Sub
(When I type Me.rText. the auto-fill drop down only suggests “value”) If I run the form anyway, it stops at this line with a Compile error: Method or data member not found.
So I am at a loss as what to do now. Any suggestions?
 
Use the actual name of the control and not the field name. If the control and the field name are the same then rename the control to txt_rText or something like that so you can refer to the control because you don't set focus on fields, you set focus on controls.
 
Thank you! I did as you said and it works perfectly.
 

Users who are viewing this thread

Back
Top Bottom