Hi, Mark.
Mysteriously, the database has disappeared.
It's not much of a mystery. While the following probably won't bring back
the deleted database, it may give you peace of mind that it wasn't your fault.
#1. An Access database file can't be deleted while it's in use, unless the
system administrator uses his special Windows security permissions to do so.
(Your system administrator didn't delete the file, so he's off the hook.)
#2. Access can't delete an Access database file while it's in use, either.
The database file must be closed before it can be deleted. Therefore, if
your database was closed when it was deleted, then your application's code
was not running -- even if you happened to write code that tried to delete
the database file itself. (Your database obviously can't delete itself,
because that's impossible. So your database application is off the hook.)
#3. By process of elimination, if the file was deleted, then either an
external application or a user deleted the file. I mention "if the file was
deleted," because it's a possibility that the file was renamed or moved
elsewhere, and if either of these situations is the case, then you'll need to
do further investigation.
If it was an external application that deleted the file, then this can only
be accomplished by either deleting the file or by overwriting the file.
a. Do you have another Access database that uses the "Kill" command in
VBA? This is the VBA command to delete a file. Or do you have code
referencing the Scripting Runtime Library where the FileSystemObject is
instantiated in VBA and the DeleteFile( ) method used? (This commonly
happens when code is written to back up a database file and then delete the
original file afterwards, only an error occurs and the procedure's error
handler was written by someone who thinks "On Error Resume Next" somehow
won't execute the next statement to delete the original file. Common with
novices, but very unlikely with experienced programmers.)
b. If not, are there any other applications in your organization that
are used to delete this database file? Could one of them have been running
after the database was last in use and before the discovery that the database
file was missing?
c. Do you have another Access database that saves a database file with
the same name as your production database file? The user is normally warned
that the file already exists, but user-defined error handling could hide this
from the user. However, the programmer has to intentionally write the code
to catch this error and hide the procedings from the user. This scenario is
unlikely, but plausible.
#4. If it wasn't an external application, then that leaves the users as the
only other suspects. It's usually the novice computer user who accidentally
deletes the MDB file when he intended to delete the LDB file, because file
name extensions don't show up on his computer (the Windows default). The
novice computer user is either afraid, or doesn't know how, to change Windows
default settings.
One can always tell the novice computer user because although the computer
has a video card capable of 65K or more different colors, the window colors
are always grey, black and white, along with the two default colors of the
active and inactive title bars.
Check this novice computer user's Recycle Bin. You may find the deleted
file there. Or you may find it in a nearby directory on the directory tree
in Windows Explorer where the user accidentally dragged the database file
with his mouse. Or you may find it on the user's Desktop. Happens all the
time.
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.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.