Moving cursor to end of line

Amy35

Registered User.
Local time
Today, 03:23
Joined
Mar 12, 2002
Messages
53
Hi
Remember my question a week or so ago...I have a form with every field locked and disabled except one. When the user enters the form all the text from that one field is highlighted...thereby if a user hits any key all the text is gone. I have found a way to have the cursor go to the beginning of the line, but I want it to go to the end of the line and rest there.
here's my code:

Private Sub ProblemDescription_Enter()
ProblemDescription.SelStart = 0
ProblemDescription.SelLength = 0
End Sub

how can I change this so the curser rests at the end of the line instead of at the beginning?
Thanks!

Amy
 
Not too sure on this as I haven't tried it.

Does something like

SelLength = Len([FieldName]) work?

Col
 
Try this:

From the main menu go to "tools", select "options", "keyboard" tab and in the "Behavior Entering Field" click the radio button for "go to end of field".

Hope it helps.
 
With the Got_Focus event
Me.ActiveControl.SelStart = Me.ActiveControl.SelLength
 
Thanks! I used the tools option to change the keyboard behavior. Can't believe I did't know that was there...but I feel better in that an Access Instructor didn't either.
Thanks for your help. I appreciate it.

Amy
 

Users who are viewing this thread

Back
Top Bottom