Code to delete a file from disk?

  • Thread starter Thread starter Elizabeth
  • Start date Start date
E

Elizabeth

I have a command button to save a report to file on a
network (*.snp). After doing some stuff with it, I want to
delete it. Can someone advise the code to accomplish this?

Thank you, Elizabeth.
 
Hi, Elizabeth.

As long as your VBA code can determine the directory and file name where
this Snapshot file has been saved, you can use the Kill command to get rid
of it. Please see the following Web page for the syntax:

http://www.Access.QBuilt.com/html/vba.html#DelFile

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
Cheers for the quick response, Gunny!
-----Original Message-----
Hi, Elizabeth.

As long as your VBA code can determine the directory and file name where
this Snapshot file has been saved, you can use the Kill command to get rid
of it. Please see the following Web page for the syntax:

http://www.Access.QBuilt.com/html/vba.html#DelFile

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)





.
 
Back
Top