CurrentDb.Execute "INSERT INTO MyTable (Field1, Field2) VALUES (5, 'abc'),
dbFailOnError
or you can open a recordset and use its AddNew method:
Dim rsCurr As DAO.Recordset
Set rsCurr = CurrentDb.OpenRecordset("SELECT Field1, Field2 FROM MyTable")
With rsCurr
.AddNew
!Field1 = 5
!Field2 = 'abc'
.Update
End With
rsCurr.Close
Set rsCurr = Nothing
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.