Hi
The problem
VBA - DAO
How do I extract a value from a string containing field names
Data:
rst1!data1 = "ABC"
rst1!data2 = "000123000"
query Fields sourced from a lookup:
FldVarString = "Nz(rst1![Data1]) & mid(rst1!Data2],3,3)" (or any of a number of combinations)
I want another variable, fldResultString to contain "ABC123"
I don't want to use dlookup or any other query-based method as this is an iterative calculation.
I thought EVAL() might work but it doesn't.
Cheers
The problem
VBA - DAO
How do I extract a value from a string containing field names
Data:
rst1!data1 = "ABC"
rst1!data2 = "000123000"
query Fields sourced from a lookup:
FldVarString = "Nz(rst1![Data1]) & mid(rst1!Data2],3,3)" (or any of a number of combinations)
I want another variable, fldResultString to contain "ABC123"
I don't want to use dlookup or any other query-based method as this is an iterative calculation.
I thought EVAL() might work but it doesn't.
Cheers
Last edited: