easiest way would be to ReDim an array of the appropriate type to the number of records.
Assume rs is the recordset:
ReDim will set the lowerlimit to 0 and the upper limit to theCode:Dim NumAry() ... ... redim NumAry(rs.recordcount) while not rs.eof NumAry(rs.absoluteposition)=rs.fields("fieldname").value rs.movenext wend ...
number of records in the dataset. You, however, DO NOT have to
use the zeroth element.
HTH




Reply With Quote