item not found in this collection

S

seeker53

The following code is used on the format of a report section:

Set qdf = db.QueryDefs("qryConsumerNoshow")
qdf("[reports]![DailyReports_Summary_Orpheum_carrier]![text127]") =
Me!Text127 & ".033"
'Set rs = db.OpenRecordset("select * from qryConsumerNoShow where
entity_id = '" & Me!Text127 & ".033' and activity_sysid = '102'")
Set rs = qdf.OpenRecordset(dbOpenDynaset)
If rs.RecordCount > 0 Then
rs.MoveFirst
rs.MoveLast
End If
Select Case rs.RecordCount
Case 1
noshowdate = rs!svc_activity_begin_date
Set rs1 = db.OpenRecordset("select top 1
svc_activity_begin_datetime, activity_sysid from dbo_tblservice_activity
where svc_activity_begin_datetime > #" & noshowdate & "# and entity_id = '" &
Me!Text127 & ".033'")
If rs1!activity_sysid = 102 Then
Label100.Visible = True
txtNoShowFee.Visible = True
txtNoShowFee = rs!policy_num
End If
rs1.Close
Case Is > 1
'Set rs1 = db.OpenRecordset("select service_charge from
qryConsumerNoShow where entity_id = '" & Me!Text127 & ".033' and
activity_sysid = '102'")
Set rs1 = db.OpenRecordset("select top 1
svc_activity_begin_datetime, activity_sysid from dbo_tblservice_activity
where svc_activity_begin_datetime > #" & noshowdate & "# and entity_id = '" &
Me!Text127 & ".033'")
If rs1!activity_sysid = 102 Then
Do
Label100.Visible = True
txtNoShowFee.Visible = True
txtNoShowFee = CStr(CSng(rs!policy_num) + CSng(txtNoShowFee))
rs.MoveNext
Loop Until rs.EOF
End If
rs1.Close
End Select
rs.Close

It recognized that there are three records via the rs query but it tells me
that it can not find the svc_activity_begin_datetime in the rs query. When I
run the query separately the field in question is there. I copy and pasted
the name of the field into the code so I know it is spelled correctly. What
is wrong?
 
Top