CLEAR CLEAR CREATE CURSOR joindata (fr i) INSERT INTO joinData VALUES (2) CREATE CURSOR table1 (f2 i) INSERT INTO table1 VALUES (1) INSERT INTO table1 VALUES (2) INSERT INTO table1 VALUES (3) INSERT INTO table1 VALUES (4) GOTO 1 DELETE GOTO 3 ? "f2", f2 ? ? "One table" SELECT *, tudf(f2) ; FROM table1 ; INTO CURSOR crsOne ? ? "Two tables" SELECT *, tudf(f2) ; FROM table1 ; JOIN joinData ON fr = f2 ; INTO CURSOR crsOne FUNCTION tudf LPARAMETERS tvParam ? PROGRAM(), tvParam RETURN tvParamWith one table VFP uses the first record ( deleted ). With two records it uses blank record.