Adding new records in a table problem

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

Guest

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???
 
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
 

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