Subform to Subform Navigation

  • Thread starter Thread starter AlCamp
  • Start date Start date
A

AlCamp

Given a main form with 3 small subforms, I'd like to create a method
whereby the user can (by keystroke ex. Alt-S) jump to the next subform.
If the user is in Subform1 the Alt-S would take them to Subform2... if in
Subform2 then the user would go to Subform3.

I realize I'll have to code each subform to get the proper sequence (1 to
2, 2 to 3, and 3 to 1).

What would the syntax be for the "subform to subform" navigation? (ex.
names frmSub1, frmSub2, frmSub3)

Must I use a cmdbutton on each subform to get the Alt-S to activate the
jump?

Thanks for any help in advance...

Al Camp
 
rgrantz,
Unfortunately, this page is based on a Main form with a Subform1... with
a Subform2 "imbedded" in it.
My subforms are all seperate, individual subforms, on the main form.

I think I'm just not using the correct SetFocus or GoToControl sequence.

Thanks for trying though...
Al Camp
 
Folks,
I've worked out a partial solution to this problem, so I'll create a new
post that boils the problem down to a smaller area.
Thanks,
Al Camp
 
Al:

You can make a SelectCase procedure that checks for the focus of the form
you're in, and based on the case changes the focus to the first control in
the next form.

I believe syntax for setting focus on an open form's subform would be:

me.SubformName!form.ControlName.setfocus

If that's wrong, though, (ie. you need to refer to subforms that are
indpedent of other subforms, and are all on the same subform level as the
main form), this page has great focus-set syntax for subform controls from
various places:

http://www.mvps.org/access/forms/frm0031.htm

Access also has great SelectCase help when you have Module windows open;
search for Select Case and click "example"


HTH
 
Back
Top