G
Glint
Hi All,
I thought I got this code right until I tried it and got the error message
"Type Mismatch". I have not figured out what went wrong.
Dim rcdAttend As Recordset, Dtb As DAO.Database
Set Dtb = CurrentDb
Set rcdAttend = CurrentDb.OpenRecordset("PatientAttendance") 'Type
mismatch error
rcdAttend.AddNew
rcdAttend!DDate = DDate1
rcdAttend!DTime = DTime1
rcdAttend!PatientID = PatientID1
rcdAttend.Update
It appears the error occured at the level of Addnew. I had to include
Microsoft DAO 3.6 Object Library in the list of References before the code
was accepted on compile. What should I do?
I thought I got this code right until I tried it and got the error message
"Type Mismatch". I have not figured out what went wrong.
Dim rcdAttend As Recordset, Dtb As DAO.Database
Set Dtb = CurrentDb
Set rcdAttend = CurrentDb.OpenRecordset("PatientAttendance") 'Type
mismatch error
rcdAttend.AddNew
rcdAttend!DDate = DDate1
rcdAttend!DTime = DTime1
rcdAttend!PatientID = PatientID1
rcdAttend.Update
It appears the error occured at the level of Addnew. I had to include
Microsoft DAO 3.6 Object Library in the list of References before the code
was accepted on compile. What should I do?