>CLOSE all >USE bill in 0 >USE contact in 0 > >replace IN contact ; >*** FOR cc==LOOKUP(bill.cc,cc,bill.cc) AND NOT EOF('bill') ;&&old as prg. > > FOR thisform.text1.value==LOOKUP(bill.(thisform.text1.value),(thisform.text1.value),bill.(thisform.text1.value) AND NOT EOF('bill') ;&&new via form > val with VAL(bill.bill_value) > >>
lookup(evaluate("Bill." + thisform.text1.value), thisform.text1.value, evaluate("Bill." + thisform.text1.value))Assuming thisform.text1.value is the name of some field in the Bill table.
lcField = alltrim(thisform.text1.value) LookUp(Evaluate("Bill." + lcField), lcField, Evaluate("Bill." + lcField))You might also want to consider some error handler.