[AccessD] Iterate through similarlnamed columns in a recordset

Gustav Brock Gustav at cactus.dk
Wed Jun 15 06:49:18 CDT 2005


Hi Arthur

Did you send this today? And the 11. June too?

/gustav

>>> artful at rogers.com 06/15 1:08 pm >>>
You have a table like this (let's not bring up normalisation)...

PK autonumber
Size1 long
Height1 long
Weight1 long

(The last three are repeated 3 times, so their last digits are 2, 3 and
4.)

Assume the required vars are declared and filled. rs = New
ADODB.RecordSet. etc.
I want to write a loop something like this:

For i = 1 to 4
    debug.print rs("Size"&i)
    etc.
Next

But I can't seem to get it right. I tried using eval() and various
other
approaches. Ideas?

Arthur

-- 
AccessD mailing list
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list