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).
 

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

Similar Threads


Top