Adding a record to a table

J

Jim Pockmire

Is there an easier way to add a record to a table, than using the code
below?

Sub AddToMyReports()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("MyReports")
rs.MoveLast
rs.AddNew
rs!USER_CODE = "03JIMP1"
rs!RptCode = "99999"
rs.Update
End Sub
 

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

Top