Stuart McLachlan
stuart at lexacorp.com.pg
Thu Mar 16 07:27:54 CST 2006
On 15 Mar 2006 at 21:29, Rocky Smolin - Beach Access S wrote: > > So I've traced it down to the lines Me.pgXXX.SetFocus. When that line > executes it hoses the KeyPreview property and even setting it at the end of > the module doesn't help. > I just built a simple test application (AXP using an A2K format database). I can't reproduce your problem. The following code works perfectly for me with a Tab control with four appropriately named pages. Want to send me a zipped database with the problem form? I will see if it works here - it may be something on your PC causing it. 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 -- Stuart