Hi all
I'm using Access to reformat some data - not what it's designed for I know but it's the only tool I have available at present.
Basically I need to be able to lookup a field name and write some data to it. I've attached the bit of code where it's falling over.
For ic = 1 To NoCols
FieldName = DLookup("[ColLetter]", "Columns", "[ColNumber]=" & ic)
MyRstOutput!FieldName = data(ic, ir)
Next ic
FieldName is a string which contains the name of the field I want to write to. I've guessed at [MyRstOutput!] & FieldName but that's wrong as well!
Any ideas, anyone?
TIA
shay
I'm using Access to reformat some data - not what it's designed for I know but it's the only tool I have available at present.
Basically I need to be able to lookup a field name and write some data to it. I've attached the bit of code where it's falling over.
For ic = 1 To NoCols
FieldName = DLookup("[ColLetter]", "Columns", "[ColNumber]=" & ic)
MyRstOutput!FieldName = data(ic, ir)
Next ic
FieldName is a string which contains the name of the field I want to write to. I've guessed at [MyRstOutput!] & FieldName but that's wrong as well!
Any ideas, anyone?
TIA
shay