Tab Order Subforms

  • Thread starter Thread starter Tony Williams
  • Start date Start date
T

Tony Williams

I have a tab control on which there is a subform. I can set the tab order to
tab into the sub form (Which is a continuous form with any number of
records) but I can't tab out of the subform when I have finished in the sub
form and go back to the tabcontrol.
Anyone help?
TIA
Tony Williams
 
Put an almost invisible textbox in the subform (height and width both equal
to zero). Name it "txtSetFocus". Make sure that it's the last control in the
tab order for the subform.

On its "OnGotFocus" event, put code similar to this:

Private Sub txtSetFocus_GotFocus()
Me.Parent.PageNumberName.SetFocus
End Sub

where PageNumberName is to be replaced by the real name of the page on which
the subform is located.
 
As ever thanks Ken
Tony
Ken Snell said:
Put an almost invisible textbox in the subform (height and width both equal
to zero). Name it "txtSetFocus". Make sure that it's the last control in the
tab order for the subform.

On its "OnGotFocus" event, put code similar to this:

Private Sub txtSetFocus_GotFocus()
Me.Parent.PageNumberName.SetFocus
End Sub

where PageNumberName is to be replaced by the real name of the page on which
the subform is located.


--
Ken Snell
<MS ACCESS MVP>

order
 
Back
Top