Reputation: 859
I have a database with tables that are linked to a different database in a network drive. (The other database is on a different machine, and a network drive on my machine is mapped to it.)
While I was running some VBA code the connection to the network drive was broken, and I got an error message. When I tried accessing any local tables in my database, or when I tried closing Access I got error messages. I closed access through the task manager, and now when I open it I get the following message:
The VBA modules in this database appear to have been saved with errors. Access can recover the modules, but you should backup the database first...
I backed up and then clicked OK, but the modules have been entirely wiped out. In the backup I cannot access the modules, I just get that message again.
Please help! Sadly I do not have a backup from before, and I need the modules. Is there a way to recover at least the modules? Even in text file?
I tried importing the modules into a different database, but I get the same error message.
EDIT: When I try to recover I get the following message:
Cannot open database ''. It may not be a database your application recognizes, or your file may be corrupt.
What does this mean? It seems like Access is trying to access an empty string.
Upvotes: 1
Views: 4783
Reputation: 55921
Do double-check the path. Most likely it is:
"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE"
and a space is missing:
"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" /decompile
That's for A2016. It is Office15 for A2013.
Upvotes: 1
Reputation: 1641
oh... That one hurts! I've been in a similar situation but not exactly the same way. The good news is that you can almost always recover from these situations. Try this: Create a new blank database and import all tables, queries, forms, reports, macros, and modules into the new database...
If that's not possible you may have to decompile the database. See: https://www.fmsinc.com/microsoftaccess/errors/Bad_DLL_Calling_Convention.asp
Upvotes: 1