Increment or Loop thru a series

A

ayeFayze

I have a macro for serials numbers which, when run, threads thru several
forms, dropping data off at specific tables. Is there a way to have this
macro fed from a list of serial numbers, doing one at a time, until the list
is completed?
I would greatly appreciate some guidance here, as trial and error isn't
working.
 
M

MichaelRay via AccessMonster.com

You can set up an array and load it with the serial numbers, then loop
through the array.

As an example:

Dim SerNum(3) 'create the array
SerNum(0) = 123 'assign the values
SerNum(1) = 456
SerNum(2) = 789
SerNum(3) = 888

Dim x As Integer
For x = 0 To 3
'Do stuff here with SerNum(x)

Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top