Thread: Cursor position
View Single Post
  #2  
Old January 11th, 2010, 09:37 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Cursor position

On Mon, 11 Jan 2010 16:04:58 -0500, "Abe Katz" wrote:

Hello,
When I tab from one control to another or use docmd.gotoControl the control
gets highlighted automatically.
Is there a way to put the cursor at the end of the control or at the
beginning of the control without highlighting the control?
Thanks
Abe


Take a look at the SelStart and SelLen properties:

Me!controlname.SelStart = Len(Me!controlname)
Me!controlname.SelLen = 0

will put the cursor at the end, with nothing selected.

It might need to be Len(...) + 1, I haven't used it in a while!
--

John W. Vinson [MVP]