I am finding that both the keydown and keypress events "sort of" get me to where I want to go but not consistently. My set up is that I have a main form with 2 subforms. I want to be able to tab/enter across 2 text boxes on the main form then straight into the first 2 text boxes on the first subform and then straight into the first 2 text boxes on the 3rd subform. In essence, I am visually tabbing/entering across a row of 6 textboxes on my form (but the user is unaware that the form is made up of a main and 2 subforms). Here is the code I am using:
Private Sub BG2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyTab Or vbKeyReturn Then
Forms!frmcsauditflex![subformFLEXBillingGroups]!.SetFocus
End If
End Sub
What I am finding is that often, once I hit tab or enter from the 2nd text box, it takes me to the second text box on the subform. Also, if I enter the number 1 in the text box, it jumps around everywhere....
Any suggestions?
Dawn Coleman, Business Analyst
UnumProvident Corporation
PLEASE RECYCLE AND ENCOURAGE YOUR OFFICE/COWORKERS TO DO SO AS WELL.