Subform to Subform Navigation

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
 
A

AlCamp

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
 
A

AlCamp

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
 
R

rgrantz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top