Why .RecordCount() not working

From: Anna S (AnnaS_at_discussions.microsoft.com)
Date: 11/02/04


Date: Mon, 1 Nov 2004 16:52:02 -0800

I am confused as to why .RecordCount() won't return the expected value in the
following code

    Dim dbDatabase1 As Database
    Dim qryQueryDef1 As QueryDef
    Dim rstID1 As Recordset
    Set dbDatabase1 = CurrentDb()
    Set qryQueryDef1 = dbDatabase1.QueryDefs("qry_letter")
    qryQueryDef1("Enter the ID number") = Form_frm_letter.com_person
    Set rstID1 = qryQueryDef1.OpenRecordset()

rstID1.RecordCount() always returns the value 1 even when there are more
records in the recordset. In addition the rstID1.MoveFirst and
rstID1.MoveNext methods work fine.

rstID1.RecordCount() will work if rstID1 is the recordset for a form.

Can anyone explain this to me please?
Anna