D
Deanna S via AccessMonster.com
This should be simple and I've done this in many apps, but for some reason, I
cannot get this code to work:
Dim db As Database
Set db = CurrentDb
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblStaff", dbOpenDynaset)
With rs
.AddNew
!UserName = txtUserName
!FirstName = txtFirstName
!LastName = txtLastName
.Update
.Bookmark = .LastModified
End With
There is no error given and it steps through as if it's working perfectly,
yet the record is not inserted. The key is autonumber and none of the fields
besides the ones above are required. Any ideas????
Thanks,
Deanna
cannot get this code to work:
Dim db As Database
Set db = CurrentDb
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblStaff", dbOpenDynaset)
With rs
.AddNew
!UserName = txtUserName
!FirstName = txtFirstName
!LastName = txtLastName
.Update
.Bookmark = .LastModified
End With
There is no error given and it steps through as if it's working perfectly,
yet the record is not inserted. The key is autonumber and none of the fields
besides the ones above are required. Any ideas????
Thanks,
Deanna