RecordCount Problems

G

Gibson

I'm using the following code to set up a recordset of a query (stDocName)
with a criterion. The creation of the recordset works fine. The problem is
in the recordset there are three records yet the code below sets the
intRecords to 1. rs.RecordCount returns 1 when there are three records from
the query when I run it apart from the code. Any thoughts on what I did
wrong? Thanks.

Set qdf = DB.QueryDefs(stDocName)
Set prm = qdf.Parameters(0)
'Set parameter value
prm = strField1
'Execute QueryDef to produce a recordset
Set rs = qdf.OpenRecordset

intRecords = rs.RecordCount
 

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

Top