MartyConnelly
martyconnelly at shaw.ca
Wed Mar 15 20:39:04 CST 2006
Stick this in or set in Forms properties, keypreview default is no. Private Sub Form_Load() Me.KeyPreview = True End Sub Rocky Smolin - Beach Access Software wrote: >Dear List: > >I have a tab form with four tabs. I want to set the focus in each tab >by pressing the functions keys F5, F6, F7, F8. The KeyDown event is coded: > >Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) > > Select Case KeyCode > Case 116 > Me.pgOrderNumber.SetFocus > KeyCode = 0 > Case 117 > Me.pgReceiving.SetFocus > KeyCode = 0 > Case 118 > Me.pgProcessing.SetFocus > KeyCode = 0 > Case 119 > Me.pgShipping.SetFocus > KeyCode = 0 > End Select > >End Sub > >The first time I press one of the four function keys it works. Then, it >quits. (Like if I press F7 the first time is sets the focus to >pgProcessing, the second time it invokes the spell checker.) > >Does anyone know why this would happen? > >MTIA > >Rocky > > > -- Marty Connelly Victoria, B.C. Canada