-
I want to place a command in the form_load event to put the cursor in a text box.
My intention is that when someone runs the program they can just start typing, rather then click the mouse in the text box before they can type.
how can I do this?
------------------
I am so skeptacle, I can hardly believe it!
-
Just use the statement on the load of the form: text_box1.SetFocus
-
never mind I am a tard!!!!
-
janitor that doesn't work in the form_load event unless it has the me.show before the setfocus command. That was my problem, I did not have the me.show command in form load
[This message has been edited by badgers (edited 01-05-2000).]
-
Actually I think you can just set one of the properties in the porperties window to default the text box. I forget which one and I maybe wrong about the fact althogether! Does someone wish to correct me?
-
You would actually probably be better of putting it in Form_Activate. Putting it there eliminates any need for Me.Show, and, if you have the kind of app where this form is hidden and then shown again, your textbox will have the focus.
------------------
Marty
-
thank you that is a good idea!
-
Why don't you just set the Textbox's TabIndex to Zero?
Then it'll have Focus when the Form Loads.
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]