Form Open - go to new record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have been playing with the OnOpen command for a data entry form. i would
like to have the data entry form go to a new record once the form is open.

thanks,
 
David,

If you set the form's Data Entry property to Yes on its property sheet, then
this happens automatically, but will not allow you to view/ edit other
records.

Or if you want to intermittently open the form in Data Entry mode, you'd use
the 5th argument in the DoCmd statement on the calling form.

DoCmd.OpenForm "MyForm", , , , acFormAdd

Or if you want to immediately go to a new record but be able to view/ edit
existing records, you can either code it in the calling form:

DoCmd.OpenForm "MyForm"
DoCmd.GoToRecord , , acNewRec

OR

You can use the 'called' form's On Open or On Load event

DoCmd.GoToRecord , , acNewRec

HTH,
Brian
 
Back
Top