i wrote a query and ran the sql, i tried to use rs.recordcount to find out how many record there r, but i always got 1, i checked the query, it difinitely returns more than 2 records, why this function doesn't work? any body could help me to have a look my code? thanks a lot!
.....
Set db = CurrentDb
sql = ""
sql = "SELECT ID " & _
"FROM Invoice " & _
"WHERE Payment_No = 2"
Set rs = db.OpenRecordset(sql)
r = rs.RecordCount
Me!txt = r
rs.Close
db.Close
.....
Set db = CurrentDb
sql = ""
sql = "SELECT ID " & _
"FROM Invoice " & _
"WHERE Payment_No = 2"
Set rs = db.OpenRecordset(sql)
r = rs.RecordCount
Me!txt = r
rs.Close
db.Close