Using the Kill Statement

gMAC

Registered User.
Local time
Today, 14:11
Joined
Dec 21, 2001
Messages
29
I have a command button on my form that creates a new database and places it in a seperate folder for Emailing data. During the day I may have created many new databases.
I also have a comand button for deleting all the database's in the folder after they have been Emailed. (I'm using the Kill statment with path to directory.)These all work great unless you happen to hit the delete key twice or there is no database to delete. I then get an error message "File not found". What would I put in my code to keep from getting the error, when there's nothing to delete?
Thanks
gMAC
 
Add error handling to the code to capture the specific error code being generate when there is no files in the folder and handle this error accordingly.

RDH
 
Of course, I don't know why I did'nt think of that.
Thanks
gMAC
 

Users who are viewing this thread

Back
Top Bottom