I'm working on an application and for some reason I have an issue understanding something. I have code that looks like this....
dim number as integer
number = rs.recordcount (only 1 record - so number = 1)
for x = 1 to Number
RecordCount returns the number of records that have been read, or something like that - it does not return the total number of records, that value isn't known until the recordset has been iterated.
For...Next loop can't iterate a recordset efficiently.
While loop instead:
While Not rs.BOF And Not rs.EOF 'stuff rs.MoveNext Wend