* If you can obtain R/W access to a file, delete it local lnMyFile lnMyFile = fopen("c:\global\clientstats.xls", 2) if lnMyFile > 0 fclose(lnMyFile) * Some command is missing here endifWell, the original idea is to insert something into the place marked with "some command is missing here". Here, you can delete an un-needed file, or perhaps call up the e-mail program. All this, AFTER closing the file with fclose(), and only if the test (if lnMyFile > 0) is true.
* If you can obtain R/W access to a file, delete it local lnMyFile lnMyFile = fopen("c:\global\clientstats.xls", 2) if lnMyFile > 0 fclose(lnMyFile) This.Enabled = .F. && This will disable the timer * Invoke the e-mail processing here endifPerhaps you can figure out what is the best moment to enable the Timer (to start checking if it can access the file).