Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADD RECORD BUTTON 1

Status
Not open for further replies.

leslied

MIS
May 29, 2003
108
US
OK Guys heres another little project...
I have this form that I am using to populate a table. I have a button on the form which is basically used to add info into the table. The button has this code on it:

Private Sub Add_Click()
On Error GoTo Err_Add_Click


DoCmd.GoToRecord , , acNewRec

Exit_Add_Click:
Exit Sub

Err_Add_Click:
MsgBox Err.Description
Resume Exit_Add_Click

End Sub

When i fill out the fields and press this button the first time it populates the field. When i make a second entry, it write the information over the the fields that are already populated. In other words it is being replaced. I don't want it to work like that, I just want it to continue populating the table. Is there somthing I am missing?

Thanks for the help guys and gals....
 
There's nothing wrong with the code but how you have set the form up
are the controls bound or unbound are there any filters is it based on a query is there any other code
not enough information

Hope this helps
Hymn
 
Thank you very much for your help. Ithad to do with how the form was set up. I did not know that could be a problem. Thats something I learned. Thank you. Have a star.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top