Bound Form opens to new record

M

mark

We have a bound form that opens by default to the first of several thousand
records. We'd like the form to automatically open to a new blank record.
What code is necessary to do this?

Thanks in advance.

Mark
 
R

Rick Brandt

mark said:
We have a bound form that opens by default to the first of several
thousand records. We'd like the form to automatically open to a new
blank record. What code is necessary to do this?

Thanks in advance.

Mark

Use the optional acFormAdd argument if opening from code or set the
DataEntry property of the form to Yes in design view.
 
J

JonOfAllTrades

mark said:
We have a bound form that opens by default to the first of several thousand
records. We'd like the form to automatically open to a new blank record.
What code is necessary to do this?

Thanks in advance.

Mark

You can also add code such as this to your form's On_Open event, and it will
always run. You won't have to hunt down all buttons that open the form.

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub

Using DataEntry hides all existing records, though this may be what you're
looking for.
 
Top