i read the thread entitled "Convert Field Value String to Actual Field in Expression"
It appeared that the final solutions got moore complex not less complex
MY PROBLEM IS:
1. get a value from one table as a string "C"
2. lookup the value of a field in a TABLE2 "CD"
where the field name = the value of field in TABLE1
I CAN GET THIS USING DLOOkUP, BUT NOT BY FIND METHOD
example:
TABLE1 - 3 FIELDS (50 parts, 1 code and 1 item per part)
(part as string)+(code as string,3) + (item as string, 255)
99 choices for code are (HD01->HD99)
ex: c = value from TABLE1 (if [PART] - "AN" then c = "HD05")
TABLE2 - 100 FIELDS (1 ID, 99 dates) FOR SPECIFIC PERSON
(ID as long) + (HD01) .. (HD99)
ex CD = DLookup("" & C & "", "", "ID = " & PATID)
(find record using findfirst and get value from field "HD05")
Returns CD = #02/03/2006#
I am under impression that using DLOOKUP is slower than using the FIND Method.
If so, what I want is:
TABLE2.FINDFIRST ("ID = " & PATID)
C= "TABLE2" & C
RETURNS "C = TABLE2!HD05"
CD = C
CD = #02/03/2006#
What I get is
CD = "TABLE2!HD05 "
Any Ideas?