Sub cmdAddADO()
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
With rst
.ActiveConnection = CurrentProject.Connection
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open "Select * from Employees Where EmployeeID = 0"
.AddNew
!FirstName = "newF"
!LastName = "newL"
!Region = "new"
.Update
End With
End Sub
|