Talismanic
11-13-2000, 06:52 AM
I want to force the user of my form to mouse over from one control to another. So I want the last control of a form to stop the tab button.
The tab should work until it gets to the control and then be stopped.
Any ideas?
Former
11-13-2000, 07:09 AM
If you put some code on the Key Press event of the control, a catch for the press of the Tab button, and cancel the action.
Former
11-13-2000, 07:54 AM
Sorry for not being more helpful before you will need this code
Private Sub myTextBox_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 Then
KeyCode = 0
End If
End Sub
Basically when a key is pressed when the text control has focus this sub will run. It checks to see if the key pressed was the tab control (9) and if it was cancels the key press (0). I hope this makes more sense