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!

Set Focus to a Text box, NOT the sub-form, like it's doing. 1

Status
Not open for further replies.

MSWhat

IS-IT--Management
Jul 19, 2007
62
US
Hey, all.

So this is posing to be a lot bigger of a problem and a lot more frustrating than earlier anticipated.

I have a form which has multiple tabs. The third tab contains a column of information in the tab, and then a sub-form in it also.

When you click on the tab to look at that page ("Bank Account Info"), the mouse automatically snaps to the first field in the sub-form. This not only shifts the entire screen such that the information on the page which is not on the sub-form becomes out of sight, but it also shifts the scroll bar so that you have to scroll the bottom to the left in order to view the first few tabs.

This is incredibly un-user-friendly, and my clients have complained.

Any ideas? I've tried an OnClick event of GoToControl, with the first text box of the page (NOT the subform) as the item, but this only works when you click on the actual page, not the tab.

Basically, how can I make it so that the cursor automatically snaps to a field on my page, not a sub-form on the page when a person first opens that tab?

Thanks in advance.
 
I think a great solution would be to set an OnClick event of GoToControl for the button of the tab itself.

That said, the only OnClick event that I can set seems to be of clicking on the actual page, and not the button of the tab.

.....Just a thought.
 
Have you looked at your tab order (View->Tab Order)? It is possible to set focus to a page of a tab control.
 
Brilliant, Remou! NO one could figure that out. Thanks for the suggestion. I just changed the tab order (didn't really know what that was) and now it's working perfectly.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top