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

Setting focus on subform

Status
Not open for further replies.

jkejke

Programmer
Jan 18, 2001
35
US
Have a multi-tab form--when go from one page to another want focus to be set on the first field--have used setfocus but does not work--

What is happening is that user tabs to text field other than
first and leaves form--comes back and cursor in field that it was left in--want it to go back to first text box--


Thanks in advance




 
Go to View and check the Tab order. Be sure the controls are in the order you want them viewed and that the one you want the cursor in is first.

Also add code to the forms OnGotFocus property that sets focus to the control/field you want the cursor to be in.
 
Have tried this --- just tried again -- did not work --

just looked at what I wrote and let me try to put it a little better--

user opens form --- it is a 6 tab form -- they go to a tab, go in and change or add some information there and then have to go to another tab (page) then come back and change something else--want to go to text field called mailaddress1

We have a name field on the (tab/page) that have also tried to set focus to but that does not work either

Form they are inputting data from is not input friendly--

Thanks for help--any other thoughts
 
Also set the focus to the appropiate field for the OnGotFocus property for each tab, so you set focus to the desired field/control on that tab's controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top