Adding a record using a form

cailo

New member
Local time
Today, 17:37
Joined
Sep 29, 2003
Messages
7
Hi all. I know this is a stupid question but currently I have a database that allows you to add a record using a form. My issue is when I open the form up, there is already data in all my fields, so when I overwrite the fields the previous record is removed from my database. Is there a way to open the form with no records showing, just a blank form?
Cheers
Cailo
 
There are a couple of ways of doing this.......

If you only want to see a blank record and none of the others......
Set the "Data Entry" option to yes under the forms properties

If you want the form to open at the last record........
Add this code to the "On Open" event of the form

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

Louchey
 
Thanks alot louchey,

all is working well now.

Thanks again
 

Users who are viewing this thread

Back
Top Bottom