Deleting a LAN file from Access using VB

  • Thread starter Thread starter pea01
  • Start date Start date
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.
 
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.
 
Back
Top