Avatar of wlwebb
wlwebb
Flag for United States of America asked on

Access - Main Form with 4 Sub Forms. Tabbing to 2nd, 3rd and 4th SubForms.

Hello
I have a Main Form with 4 Subforms.  When I press the Tab key it tabs through the Main Form and then will tab into the 1st Subform.

However once it has tabbed through the fields of the 1st SubForm pressing tab just stays at the last field of the 1st SubForm.

Is there a setting or something else that once I press the tab key when I'm in that last field of the 1st subform that I can get it to tab to the 2nd SubForm?  If it makes any difference, the 2nd Subform is an Option Group.
Microsoft Access

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)

8/22/2022 - Mon
SOLUTION
Dale Fye

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Jim Dettman (EE MVE)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
wlwebb

ASKER
Split the points as both did work for me.

Thanks.. inet went down after I posted...  That was what I was afraid you guys were going to suggest.  Not that I'm afraid... just seems there should be an overall setting on the main form to toggle if you want tabs to go through subs in order....

BTW.. I have A2007.  When I tab it it gets into the 2nd sub it just stays in that 2nd sub.  Mine doesn't go back to the Main Form
Dale Fye

There is some confusion here, probably my fault.  I don't know how I missed it, may have been the reference to tabbing between controls, but my response was about tabbing between controls in separate tabs of a tab control, not about between subforms.

Although the same concept works for both ideas, the syntax would be a bit different.  To set the focus to the first control in the next subform, the syntax would look something like:

me.parent.subform2.form.txtControl1.setfocus
Jim Dettman (EE MVE)

That's the way su-forms work.  I have some code to tab out of a subform back the the main form when the first /last control is hit (normally you use Ctrl/Tab and Ctrl/BackTab), but I find the setfocus method easier and it gives me a complete level of control over movement between main, subforms, and tabs.

THe toher gotcha; when you move into a subform, the main form record is committed.  Once of my biggest complains about the way Access works.

Jim.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy