Using Visual Basic I have a form that has five text fields. The first
four fields use the <Enter> key to set the focus to the next field. The
last text field is the body of the form. It needs access to both the
<Enter> key for paragraph line feeds, and the <Tab> key for tab input.
So I've tried to allow this field to use the <CNTRL> <TAB> keys in
combination so that they go back to the previous fields because the
<Enter> and <Tab> keys have been disabled for field tabstops.
I've tried doing the following in the KeyDown Event for that field,
but it doesn't work for the tab. It only works for the NON-ASCII
keys like <F1>-<F12>. Does anyone know what I can do to get this to
work?
Sub Text1_KeyDown (KeyCode As Integer, Shift As Integer)
Dim CtrlDown
Const KEY_TAB = &H11
Const CTRL_MASK = 2
CtrlDown = (Shift And SHIFT_MASK) > 0
If KeyCode = KEY_TAB Then
If CntrlDown Then
Text1.SetFocus
End If
End If
End Sub
Any help would be very much appreciated.
Thanks, Sheryl