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!

Populating a table from a FORM

Status
Not open for further replies.

leslied

MIS
May 29, 2003
108
US
I had posted this issue earlier and thought I had it solved but it has not been working as well as I thought It was. This is the code for a button on a form. When the user presses this button it is suppose to append or add information into a table:

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

It is not working that way. It seems to be replacing a row of records that are already in the table it is not appending to the table. I would appreciate your input. Maybe I am leaving out something I should'nt be. Thanks

Regards
 
Ok Guys and gals, I took a second look at the code. There is nothing wrong with the code. I figured that much out of it. What seems to happens is this, When i put information in the table, lets say I close the form and open it again and it opens with the last information I put in their. The users may not be aware that it opened showing the last info that was put in. I want the form to behave in such a way that ti clears whatever is in the fields after the ADD button is clicked. How can I do that. That is a little more code and I am not sure as to it.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top