Start in the first position the cursor! (1 Viewer)

calucho

Registered User.
Local time
Today, 01:49
Joined
Nov 25, 2011
Messages
18
Hi;
I have a form for Data Entry in access 2010 I want that the cursor come back at the first position of the field on my form whe I finish to enter the information. theree is a option for these??

Thank you for you help.

Carlos
 

MarkK

bit cruncher
Local time
Today, 01:49
Joined
Mar 17, 2004
Messages
8,178
To set the cursor to a control, call the control' setfocus method...
Code:
Me.Textbox1.SetFocus
...and to set the length of the selection, use the SelLength property of the control...
Code:
Me.Textbox1.SetFocus
Me.Textbox1.SelLength = 0
I think SelLength will fail if the control does not have the focus.
Cheers,
 

John Big Booty

AWF VIP
Local time
Today, 19:49
Joined
Aug 29, 2005
Messages
8,263
I'm not sure if this is what you want but try setting the Form's Cycle property to Current Record.

 

Attachments

  • Capture.PNG
    Capture.PNG
    13.9 KB · Views: 3,648

John Big Booty

AWF VIP
Local time
Today, 19:49
Joined
Aug 29, 2005
Messages
8,263
I think that lagbolt's code should read;
Code:
Me.Textbox1.SetFocus
Me.Textbox1.Sel[B]Start[/B] = 0
 

calucho

Registered User.
Local time
Today, 01:49
Joined
Nov 25, 2011
Messages
18
Hello;
Thank you very much for you help

Carlos
 

Thales750

Formerly Jsanders
Local time
Today, 04:49
Joined
Dec 20, 2007
Messages
2,061
Along these same lines, is there a way to make the "mouse" hover over a specific place when opening forms.

If a Control to open a Form is physically the same as a Subform that is on the opening Form the Form can go into a refresh loop until the user moves the mouse.
 

isladogs

MVP / VIP
Local time
Today, 08:49
Joined
Jan 14, 2017
Messages
18,186
You do realise this is a 7 year old thread?
Rather than use complex code unnecessarily, I suggest you move the control or the subform.
Alternatively, disable the control after clicking it.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:49
Joined
Oct 29, 2018
Messages
21,357
Along these same lines, is there a way to make the "mouse" hover over a specific place when opening forms.

If a Control to open a Form is physically the same as a Subform that is on the opening Form the Form can go into a refresh loop until the user moves the mouse.

Hi. You might consider starting a new thread rather than tagging on a 7-year okd discussion. You can add a link to this one for reference. In any case, I'm not sure I fully understand your question. What's happening with your form? Can you post some screenshots?
 

Users who are viewing this thread

Top Bottom