set form for new record

B

balu

I have a form when ever it is reopened form showing the first record
but insted i want the form to set for new record as it opened
how to do this please
balu
 
J

John W. Vinson

I have a form when ever it is reopened form showing the first record
but insted i want the form to set for new record as it opened
how to do this please
balu

You can set the Form's Data Entry property to Yes, as Rbear3 suggests; this
will work but has the disadvantage that you cannot then use the form to see or
edit existing records.

An alternative is to open the Form in design view. View the Form's Properties;
on the Events tab find the Load property. Click the ... icon by it and choose
"Code Builder". Access will give you a Sub and End Sub line, just add one
more:

Private Sub Form_Load()
DoCmd.GoToRecord acDataForm, Me.Name, acNewRecord
End Sub

John W. Vinson [MVP]
 

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

Top