Adding new records in a table problem

G

ghost

Hi,

I have a form for adding new records in a table. The problem is, when I open
this form and it replaces the last record in the table with the new record.
Can any body help me plzz???
 
W

Wayne-I-M

It sounds to me as if you are opening the form on the 1st record.

Ensure that the primary field in on the form somewhere (it can be set
visible=No if you want to hide it).

Either set the form to go to a new record on opening

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub


Or add a button to the form to create a new record

Private Sub ButtonName_Click()
DoCmd.GoToRecord , , acNewRec
End Sub

Ensure that you have bound the form's controls to a field in the table/query
so you can see what is in them before you start over typing.

Good luck
 
Top