SELECT tmpData SET ORDER TO ID outputFileName=outputPath + SUBSTR(DTOS(RunDate), 5) + "_" + "BOGUSTEST.TXT" ERASE (outputFileName) fh=FCREATE(outputFileName) && Default is Read/Write in FCREATE(). IF fh > 0 * File creation succeeded! Now, write the header to the text file. =FPUTS(fh, lcHeader) && The Header string, lcHeader, was created earlier. * GO TOP believe in vfp Docs! SCAN * Assemble the text data. lc = m.GrpID ; + m.GrpNum ; + PADR(m.FirstName, 15) ; + IIF(EMPTY(m.Initial), " ", m.Initial) ; + PADR(m.LastName, 20)and not use the vfp textmerge, as this way is still optimized but also