2 subforms; 2nd common to >1 main form; Tab stop order

G

Guest

All of my production forms are set up with two subforms; the first subform is
a production details subform (unique to each main form) and an inventory
subform that is used on all of the production main forms. Each main form has
code written directing the tab order or focus to go from the first subform to
the second subform, sfrmInventory (instead of forever looping internally thru
the subform).

My question is how do I pass the focus from the Inventory subform back to
the main form when the Inventory subform is used on more than one main form?
Or is this not possible in Access using subforms?

Thanks,
AG
 
M

Marshall Barton

Access said:
All of my production forms are set up with two subforms; the first subform is
a production details subform (unique to each main form) and an inventory
subform that is used on all of the production main forms. Each main form has
code written directing the tab order or focus to go from the first subform to
the second subform, sfrmInventory (instead of forever looping internally thru
the subform).

My question is how do I pass the focus from the Inventory subform back to
the main form when the Inventory subform is used on more than one main form?
Or is this not possible in Access using subforms?


Use the inventory subform's dummy text box's Enter event to
set the focus to the desired main form control:
Parent.mainformcontrol.SetFocus
 
G

Guest

I actually tried that based on RG's advice but it failed me when I tried it
out on two forms. I tried it again and this time it worked. I'll be &%$ed
if I know why.

Thanks Marsh and RG
 

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