Deleting a LAN file from Access using VB

P

pea01

I create reports and output them to a directory on the LAN. I need to delete
the word document on the LAN if someone deletes the information relevant to
the Word document. For example, if someone creates an invoice and saves it
to the LAN and later that invoice is deleted, I need to delete the Word
document they saved to the LAN.
 
D

Dirk Goldgar

pea01 said:
I create reports and output them to a directory on the LAN. I need to
delete
the word document on the LAN if someone deletes the information relevant
to
the Word document. For example, if someone creates an invoice and saves
it
to the LAN and later that invoice is deleted, I need to delete the Word
document they saved to the LAN.


You can use the VBA Kill statement, specifying the full path to the file you
want to delete. That will raise an error if the file doesn't exist. You
can test whether the file exists using the Dir function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top