startup

D

Dahlman

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
 
K

kabaka

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

John Vinson

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]
 
L

Larry Daugherty

Look up GoToRecord method in Access help.

Put the code into the Open event of the form.

HTH
 
J

John Vinson

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]
 
D

Dahlman

This works however I cannot update any of the other entries. Is there a way
to allow me too?
 
Top