Control + Tab between subforms on tab control pages ACC 2002

Control + Tab between subforms on tab control pages ACC 2002

Post by brian.flan » Wed, 15 Sep 2004 03:39:22


Greetings!
What I am looking for is help trying to accomplish control + tab
exiting subform #1 on page #1 and entering the first control (main
form) on page #2. I've tried the following code, however it seems to
"fire twice", placing me at the first control on subform #2 on page
#3, totally skipping page #2. It seems to very briefly stop the
control on page two, but keeps going. Hope that made sense. Key
preview for subform is set to yes. This is a continous subform, so
options to leave subform on last control won't work. That's why I'm
trying to use control tab. I'd appreciate any suggestions.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyTab And Shift = 2 Then

DoCmd.GoToControl "txtZoningClass+"

End If

End Sub
 
 
 

Control + Tab between subforms on tab control pages ACC 2002

Post by Steve Jorg » Wed, 15 Sep 2004 04:10:44

The problem is probably that you did not assign KeyCode = 0 in your handler.
Thus, after your code runs, the keypress is also processed normally.

 
 
 

Control + Tab between subforms on tab control pages ACC 2002

Post by brian.flan » Wed, 15 Sep 2004 22:13:39

Thanks, Steve.....that did it. Appreciate the help!!!