focus at open

  • Thread starter Wayne Livingstone
  • Start date
W

Wayne Livingstone

I have a main form with a sub form that displays as a
continuous form.
The sub form displays many records at one time.
When the main form opens, is it possible for the focus to
be on the new record entry of the sub form instead of the
first existing entry on the list?
 
K

Ken Snell [MVP]

Yes. You could use code in the form's Load event to do this:

Private Sub Form_Load()
Me.Subform.SetFocus
Me.Subform.Form.Recordset.AddNew
End Sub

Subform name is the name of the main form's subform control (the control
that holds the subform).
 
Top