Hi all,
I have one form in an Access ADP project that shows a list of files in a remote server.
On double click on a list item (file), the form will copy the file to a temporary directory in the local computer (say, “C:project_temp”) and then open the file using the shell32.dll library.
As the project is to be run in several machines, for this to work, when the form opens it checks whether “C:project_temp” exists. If so, it deletes all files in it (so as not to waste disk space). If not, it creates the directory.
The problem is, when someone opens the form, then double clicks to open (ie, copy to the local machine and open) a file, then closes the form and opens it again WITHOUT closing the open file first, I get Error 70 “access denied” (Access is trying to delete a file in use).
What I’d like to do is, when someone opens the form, have Access check whether there’s an open file in “C:project_temp”, and if so, prompt the user accordingly. Any ideas how I can do this (specifically the “are there any open files?” part)?
Thank you in advance