Form Alignment

  • Thread starter Thread starter Pating
  • Start date Start date
P

Pating

I have a form which includes a subform. The subform has 3 tabs. When I
select a different tab, the entire form aligns on the first field in the
subform. I don't know vba....so is there a way to make the form align on the
first field after clicking on one of the subform tabs?
 
Do you mean setting the focus on the first control of each subform? If so
use the Change event to set the focus:

Private Sub TabCtl20_Change()

Select Case Me.TabCtl20
Case 0
Me.NameOfSubform1.Form.ControlWhatever1.SetFocus
Case 1
Me.NameOfSubform2.Form.ControlWhatever2.SetFocus
Case 2
Me.NameOfSubform2.Form.ControlWhatever3.SetFocus
End Select

End Sub
 
Back
Top