I recently read that it is faster to add a record to a table using SQL instead of DAO. So I would like to change my DAO code to SQL, but all the SQL syntax I've tried results in errors. Can someone provide me with SQL syntax to accomplish the same as this DAO procedure:
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblCustomers"
With rst
.AddNew
!CustomerName = Me.CusName
!CustomerTitle = Me.CusTitle
.Update
End With
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblCustomers"
With rst
.AddNew
!CustomerName = Me.CusName
!CustomerTitle = Me.CusTitle
.Update
End With