Perform action on sequential variables

brianjessup

Registered User.
Local time
Today, 06:55
Joined
May 25, 2003
Messages
36
How do you call a series of sequentially numbered variables?

In a While loop I'd like to store the record bookmark to a variable.

So Record1 = rst.bookmark the first time a record is accessed,
then Record2 = rst.bookmark and so on.

("Record" & counter) = rst.bookmark doesn't seem to do the job.

Thanks!
Brian
 
The easiest way to call sequential variables is to Dim then using an array like this:
Dim varBookmarks(20) as Variant

Arrays are 0-based, so the above code will produce an array of 21 variables.

Refer to the individual variables via code like this:
varBookmarks(1)=rst.Bookmark

By the way, all my examples above used variant data types to store bookmarks because bookmarks must be stored that way.
 
That has worked fantastically! Thanks much!
 

Users who are viewing this thread

Back
Top Bottom