startup

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

Guest

When I open my database I have it automatically open a form. When it opens
the form it starts at record one. Is there a way to have it automatically
open to a new record? Thanks in advance for any help. Travis
 
Use the following.

DoCmd.GoToRecord , , acNewRec

If you want to go to a new record each time you open your form put it in
your Form's Load event.
 
When I open my database I have it automatically open a form. When it opens
the form it starts at record one. Is there a way to have it automatically
open to a new record? Thanks in advance for any help. Travis

Two ways:

- Set the Form's Data Entry property to True. This has the
disadvantage that you cannot then use the form to look at or edit
existing records.

- In the Form's Open event, click the ... icon, invoke the Code
Builder and edit it to:

Private Sub Form_Open(Cancel as Integer)
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
End Sub


John W. Vinson[MVP]
 
Look up GoToRecord method in Access help.

Put the code into the Open event of the form.

HTH
 
Where do I find the From's Data Entry property or the Form's Open event?
 
Where do I find the From's Data Entry property or the Form's Open event?

Open the Form in design view; select View... Properties. Or, right
mouseclick the little square at the upper left intersection of the
rulers and select Properties.


John W. Vinson[MVP]
 
This works however I cannot update any of the other entries. Is there a way
to allow me too?
 

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