>Emailfile = "C:\EMAIL.TXT" >SELE currfile >SCAN > IF FILE(Emailfile) && Does file exist? > gnErrFile = FOPEN(Emailfile,12) && If so, open read-write > = FSEEK(gnErrFile, 0, 2) > ELSE > gnErrFile = FCREATE(Emailfile) && If not, create it > ENDIF > =FPUTS(gnErrFile,currfile.number) >ENDSCAN >=FCLOSE(gnErrFile)>I am using the code above to write info from a table to a text file. The problem is that it only seems to write the first record to the file and doesn't append the rest. Also I cannot open the file until I close foxpro completely. Anyone know what I'm doing wrong here?