im working on a small project on access 2007, i have a form that contains multiple textboxes ,and a save button. these textboxes are related to tables, so what i need is a code for that button to save the records in the textboxes in the tables and then show a msg box sayibg that the save processes is complete.
thank you very much....

Recommended Answers

All 5 Replies

Hi there,

Are you using Access VBA as your platform? or your just using access as your back-end and you have a form in VB6?

thanks very much for reply.
im using access 2007 forms, i created many tables with relations and created forms to with bound text boxes and button.
what im asking is i have a form have 5 text boxes and a button, the user should fill the data and press on the button which should save the records in the related tables.

here is my code:

Private Sub Command22_Click()
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Data is saved", vbOKOnly, "E-car System"
End Sub
the problem is when the save button is pressed the text boxes remain with same records that are filled, THEY ARE NOT BLANK, they should be blank when the records are saved. PLEASE HELP ME

DoCmd.GoToRecord , , AcRecord.acNewRec
this is what i was missing,, thanks anyway for your help the problem is solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.