ADODB.Field error '80020009' Cannot find record

P

peashoe

I get the following error: ADODB.Field error '80020009' Either BOF or
EOF is True, or the current record has been deleted. Requested
operation requires a current record.

This is my code:
' Get if module is hand-approved or not.
query = "select *, m.Title as ModuleTitle, d.IsRanged, c.IsHandApproved
as Approval, c.ApprovalDate as ApprovalDate, ci.InstructorID as UID,
i.Email, i.FirstName, i.LastName" _
& " from ModuleTop m" _
& " inner join ClassTop c on c.ModuleID=m.ID" _
& " inner join ClassInstructors ci ON c.ID=ci.ClassID" _
& " inner join Instructors i ON ci.InstructorID=i.ID" _
& " inner join LocationTop L on L.ID=c.LocationID" _
& " inner join Delivery d on c.DeliveryID=d.ID" _
& " where c.ID=" & sClassID

set rs = DBRecordset(query)

if rs("Approval")= 1 then (It stops here with the error)
sRegCode = "A"
else
sRegCode = "B"
end if

I looked in my database - and the record is set to True, so why doesn't
it see it? I also tried
if rs("Approval") = "True" and that didn't work.

Thanks in advance
Lisa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top