Hi all
Is it possible to refer to a variable from a string.
I can refer to a field by a string but can't get a string to be used aa a variable.
Heres what I have
I know the first part works (before =) as I have tried just putting any value in the table and it works fine.
obviously the second part doesn't work but hope its clear what I'm after.
my variable name is 'aName' for example and my field would be 'Name'.
The reason I need this is so that I can look through all the field names and pull the correct data from the same named variable (with 'a' prefix).
Thanks
Is it possible to refer to a variable from a string.
I can refer to a field by a string but can't get a string to be used aa a variable.
Heres what I have
Code:
rs.Fields(vField.name) = "a" & Replace(vField.name, " ","")
I know the first part works (before =) as I have tried just putting any value in the table and it works fine.
obviously the second part doesn't work but hope its clear what I'm after.
my variable name is 'aName' for example and my field would be 'Name'.
The reason I need this is so that I can look through all the field names and pull the correct data from the same named variable (with 'a' prefix).
Thanks