Tabbing through form w/ subforms

P

Pamela

In reading other posts on this issue, I added a hidden, unbound text box to
subform1 that moves focus to subform2. Upon tabbing from the last field in
the last subform, the focus then returns to the first field in that subform -
not to the first field in form. When I try to click back into the first
field of the form and start the tab order again, upon hitting the hidden,
unbound text box, I get a run-time error 2110: Cannot move the focus to the
control frmLocation. How can I get it to do a single form continuous tab
order?

Thank you so much, in advance, for help!

Pamela
 
A

Allen Browne

Perhaps you could use something like this in the Lost Focus event of the
last control in the subform:
If Me.Dirty Then Me.Dirty = False 'Save any edits
Me.Parent.SetFocus 'Focus back to the main form.
Me.Parent![SomeOtherControl].SetFocus
 

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