CREATE CURSOR temp1 (var1 c(5)) FOR ia=1 TO 5 INSERT INTO temp1 VALUES (PADL(ia,5,"0")) ENDFOR GO top var1=7 afield(aa) ?var1, m.var1, ASCAN(aa,"VAR1")>I've been looking for a VFP function or a UDF that will allow me to determine if an object's control source refers to either a column in a cursor/table or to a memory variable. If it refers to a column I need to do a REPLACE command to update the column. If it refers to a memory variable I need to replace the value in the variable. Something like this is what I'm looking for: