From: WildlyHarry on
t

"ruralguy via AccessMonster.com" wrote:

> Change the Dim statement to:
> Dim rcdAttend As DAO.Recordset
>
> Glint wrote:
> >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?
>
> --
> RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
> Please post back to this forum so all may benefit.
>
> Message posted via http://www.accessmonster.com
>
>