IF NOT EOF("main2") gcDelimName = ALIAS( ) + '.xls' gcPath = [w:\Quality Test 01\mtest\] gcDelimName = gcPath + DTOS(file_date) + ".XLS" lcFile=gcDelimName if adir(dummy,lcFile)>0 MESSAGEBOX(" file exists") THISFORM.TEXT1.SetFocus() * RETURN else COPY TO (gcDelimName) XL5 ENDIF endif . . . . .....etcthanks
>>if adir(dummy,lcFile)>0 >> MESSAGEBOX(" file exists") >> THISFORM.TEXT1.SetFocus() >> * RETURN >> else >> COPY TO (gcDelimName) XL5 >> ENDIF >> endif >>. >>. >>. >>. >>. >>>>