Tab order between subforms

  • Thread starter Thread starter Winnie
  • Start date Start date
W

Winnie

I have two subforms built in one main form. The Tab
order only allows the tab go from the main form to the
first subform. when the tab finish the last stop of this
first subform it gose back to the first stop within this
subform instead of jumps to the first stop of next
subform. I tried to set the KeyPreview of the 1st subform
to yes then in its KeyPress event check for the tab key
in the last control. When both are true, I first set

Me.Parent.SubformLastControl2.SetFocus

but it would not work. Then I did

Me.LastControlNameOfTheSubform1.SetFocus

the result I got is the tab stays at the last control of
subform1. It does not go back to the first control of
subform1 and not goes to the first control of subform2
either. What's wrong? Please advise.

Thanks,

Winnie
 
Winnie,

Try the following being careful to use the name of the
subform control and not the name of the subform itself...

Me.Parent.Subform2ControlName.Form!FirstControlName.SetFocus

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
Back
Top