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!

Focus

Status
Not open for further replies.

JohnLong

Programmer
Apr 21, 2004
15
NL
Hi,

I have a form with commandbuttons, and a few checkboxes and a textbox. On a moment one of the checkboxes is select via a commandbutton-click. After selecting the checkbox the user must go back to the next commandbutton but the programm sets the focus to the textbox. This textbox property is set tot Tabindex.false, but still the programm tabs to the text-box. How can I stop this??

Regards
Jan
 
Two techniques which may help:

Set the tab order

Open the form in design mode.
Choose the 'View ... Tab Order' menu option.
Use the mouse to drag your control names in the list, into the tab order which you would like.
Click OK to save.

Set the focus to a specific control

Where you want to force the focus to a specific control, when the previous control loses focus, use code like this:
Code:
Private Sub FirstControl_LostFocus()
    SecondControl.SetFocus
End Sub

I hope that this helps.




Bob Stubbs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top