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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving cursur. 2

Status
Not open for further replies.

WWinter

MIS
Apr 23, 2000
38
US
When adding a record by pressing the add button, I want the set the cursur to the first object on the form. I think that I need to put some code in the ADD BUTTONS click event but not sure what.

Thanks Bill Winter
 
Bill, Try this:

In your Button's click event:

ThisForm.<object you want>.SetFocus()

Where &quot;Object you want&quot; would be something like:
txtTextBox1
Or whatever the name of it is.
Best Regards,
Scott

&quot;Everything should be made as simple as possible, and no simpler.&quot;[hammer]
 
HI BillWinter,

In your Add Buttons Click event.. put the code..


DODEFAULT()
ThisForm.<object you want>.SetFocus()

If you are having other code in that.. then.. the last line should be..

ThisForm.<object you want>.SetFocus()

Suitably replave <object you want> with TEXT1 OR txtMyCode whatever.

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top