
My Worst Nightmare: Error Accessing File
Hi Kira. Try this sequence.
First, close Access, and make sure noone else has this file
open if it's on a network. In Windows Explorer, navigate to the
folder that contains the mdb file. Make a copy of the file.
If you see a small ldb file, with the same name, delete it.
(An ldb file contains locking information, and can be left
over after a crash.)
Second, open the database, and try a compact to remove any
temporary objects:
Tools | Database Utilities | Compact
Depending on your version of Access, you may also see a Repair
as a separate item on the same menu. If it's a separate item,
run that also.
Close Access again. Try a decompile by typing something like
this at Start | Run, all on one line, and including the quotes:
"c:\Program Files\Microsoft office\msaccess.exe" /decompile
"c:\My Documents\MyDatabase.mdb"
Open your database again. You'll receive a message that the
code has not been compiled, but the database will probably
work again. From the VB Editor, compile the code. Then compact
the database again.
If the problem is not solved, create a new (blank) database,
and import all the objects from the old one. Watch the name
of the objects as they are imported. If the import fails,
note the name of the object if was trying to import, and try
importing all other objects. You'll need to create the bad
object again from scratch, but you should be able to get all
the others fine.
Quote:
> Hello dear helpers:
> Now that is something I did not expect. All of a sudden, I cannot make any
> changes to the VB-part of my Access-application anymore. When I try to run
> certain procedures, or open the VB-editor, there is a pop-up saying "Error
> accessing file. Network connection may have been lost."
> What I did before that occured the first time was copying and pasting a form
> within the same database, of course giving the form a new name, as Access
> wants.
> Can anyone help me to get my database back?
--
Allen Browne, Microsoft Access MVP
Perth, Western Australia.
Tips for Access users at:
http://users.bigpond.net.au/abrowne1/