Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Item not found in this collection error?

Status
Not open for further replies.

jase2006

Technical User
Nov 17, 2006
53
GB
Hi, I am getting the "Item not found in this collection" error when I reached the "problem here" part below. There is definitely records in the "tSkills Matched a" TABLE. But for some reason it is not working. Or am I mis- interpreting the error message?

Dim dbs As Database
Dim qdf As QueryDef
Dim rst As Recordset

Set qdf = CurrentDb.QueryDefs("Skills Matched a")

qdf.Parameters(0) = strEmployee
qdf.Parameters(1) = strUser
qdf.Execute dbFailOnError
strSQL = "select count(*) as RecCount from [tSkills Matched a];"

'problem here
'***************
Set rst = qdf.OpenRecordset
rst.MoveFirst
intCount = intCount + rst!RecCount
'***************

rst.close
qdf.close
dbs.close
 
In the code you've posted strSQL is not used at all ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top