Re: How do you set focus to the last character in a control

alicejwz

Registered User.
Local time
Today, 07:09
Joined
Jul 9, 2003
Messages
91
Re: How do you set focus to the last character in a control

Hello everyone,

Is there a way I can set focus to go to the last character typed in a control? When I use set focus to a control such as memo field in visual basic the field is highlighted. I don't want the user may accidentally delete what is there. They need to add to the memo field.

I would appreciate your input.

Thanks!
 
Try this...

Code:
Me.YourTextBox.SetFocus
Me.YourTextBox.SelStart = Me.YourTextBox.SelStart + Len(YourTextBox) + 1
 
Last Character

Put the following code in the OnEnter Event of the control:

me!yourfield.SelStart = me!yourfield.SelLength

replace yourfield with the actual controlname.
 
Re:How do you set focus to the last character in a control

Thanks all for your help.
That's exactly what I need.

Thank you!
 
There is an option that allows you to do this....

Dave
 

Attachments

  • untitled.JPG
    untitled.JPG
    31.3 KB · Views: 181

Users who are viewing this thread

Back
Top Bottom