By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Control + Tab between subforms on tab control pages ACC 2002

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

On 13 Sep 2004 11:39:22 -0700, br************@ci.verona.wi.us (Brian) wrote:
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


Nov 13 '05 #2

P: n/a
Thanks, Steve.....that did it. Appreciate the help!!!
Steve Jorgensen <no****@nospam.nospam> wrote in message news:<j5********************************@4ax.com>. ..
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.

On 13 Sep 2004 11:39:22 -0700, br************@ci.verona.wi.us (Brian) wrote:
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

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.