Hello
I need to set the focus of my text box so that the cursor position is at the end of the text that is already there (ie at the point at which the user will next enter text).
It depends on which app and the sort of textbox and the method of gaining focus. Can you give a bit more detail, please?
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
After the setfocus, you could use the horrible sendkeys ..
Code:
[blue]txtComments.setfocus
SendKeys "{F2}"[/blue]
Got a feeling there's a better way though!
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
Don't think this is better, I think PHV's suggestion on using SelStart is probably the best/most efficient on single controls.
But, just for fun, one could play around with the options in Tools | Options, either thru the menu:
The Keyboard tab. In the "Behavior entering field, change from "Select entire field" to "Go to end of field".
Thanks from me as well. I was trying to figure out the syntax for the [blue]SetOption[/blue]. I now have two icons on my form, which allows the user to change the behavior without giving the user access to the Access Options form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.