SELECT 1 USE all sele 2 USE ss DO WHILE !EOF() m.a=name m.a1=p_o_box m.a2=Postal_cod m.a3=degree SELECT ALL APPEND BLANK REPLACE name WITH m.a; p_o_box WITH m.a1; postalcod WITH m.a2; degree WITH m.a3 SELECT SS if .not. eof() skip else exit endif ENDDO sele all use sele ss use returnif this a sub program, otherwise dont close your tables and removed return.....