Bound Form opens to new record

  • Thread starter Thread starter mark
  • Start date Start date
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
 
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.
 
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.
 

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

Back
Top