Help Needed !

Steveanderson

Registered User.
Local time
Yesterday, 16:35
Joined
May 27, 2010
Messages
16
Hello there,
Here is a question that has already cost me many hours of headaches...
Here is the problem:

My table structure is:
Column 1: RecID
Column 2: 1
Column 3: 2
Column 201: 200

I would like to program a VBA module which permits me to use a loop procedure to scan the columns ( using column name as a variable)

What is the synthax to use ?

Any ideas would be helpful
thanks
 
Hello there,
Here is a question that has already cost me many hours of headaches...
Here is the problem:

My table structure is:
Column 1: RecID
Column 2: 1
Column 3: 2
Column 201: 200

I would like to program a VBA module which permits me to use a loop procedure to scan the columns ( using column name as a variable)

What is the synthax to use ?

Any ideas would be helpful
thanks



example:
Code:
Dim [B]rs[/B] as DAO.Recodset

' other code here

For I = 1 to 100

   X = X + [B]rs[/B]("Col" & I) 

Next I

where rs is the name of the recordset.
 
Thank you for the answer.
I tried to use that code but it didn't work. Could there be something that is missing ?
 
Thank you for the answer.
I tried to use that code but it didn't work. Could there be something that is missing ?

NOTE: The example code I posted was only to illustrate how to use a variable or literal string to reference a field in a recordset. It was not intended to be complete or working code, only snippets to express the code syntax of: RecordsetName("fieldName")



You did not give me enough information to know if you are missing anything.

What code did you try?

What error message did you get?

what is not working?

Please post the VBA code you are using.
 
201 columns? That sounds might denormalized to me.
 

Users who are viewing this thread

Back
Top Bottom