Varying Length Dynamically

Varying Length Dynamically

I know VB insists on a _constant_ for the array subscript. Has anyone found a way around this? I would like to set an array length equal to the number of records in an Access 2.0 table.

The best way to do this is to first Dim the array as one record, for instance. Then, when you have the RecordCount from the database, use the ReDim Preserve command to expand the array to fit the record set.


Share the Post: