Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling Text Box without "SetFocus" at runtime 1

Status
Not open for further replies.

mindready

Programmer
Dec 22, 2002
15
0
0
CA
Is there a way to do better than this

txtMyBox.SetFocus
txtMyBox.Text = "16"

Thanks
 
Well it depends on what the circumstances are. If your textboxes are in the same form and you want to set txtMyBox = "16" you could do it from the AfterUpdate Event an another textbox and then you would just need
txtMyBox = "16"

But if you are coming from another form to this one then you will need to set the focus to the something on that form before you can set any values.
We'd need more info to really square away an answer to your question.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top