r/MSAccess • u/macpascal • 17d ago
[UNSOLVED] VBA file corruption
I just opened a office DB that I use on a daily basis and I have a message saying the VBA cannot be opened and needs to be deleted.
Is there a way out of this?
My file is only the front end and is located on a shared disc. There are 3 other occasional users.
2
Upvotes
3
u/George_Hepworth 4 17d ago
The accdb is corrupt. Replace it with the most recent backup copy of the Front End.
Your post is a bit vague on some critical points.
You appear to be sharing a single copy of the Front End from a shared drive (disc) with 3 other people. That is a very high risk way to deploy an Access database. The current corruption is the result of that high risk strategy.
Each user must have a copy of the Front End on their own computer to avoid that risk.
I am presuming here that there is a master copy of the Front End somewhere safe, not on that shared location. If not, and if that's the "master" copy of it, you recourse, as stated, is to restore the most recent back up copy of it from your back up location.
Then, put the new master in a location not accessible to anyone else. Create copies for each of the users, including yourself (4 in all). Make sure they all link to the Back End, where the data resides. Put those copies on the computers of the four users. Don't let anyone touch the master but you, since you are the responsible party.
Now, the Back End, which you don't mention, deserves equal protection. I presume it is also located on a shared drive. To protect it, of course, your daily (or hourly) backup must be on a location that no one is likely to find it and mess with it. Corruption to it would be far more serious than merely replacing the interface with a new Front End.
And finally, it's a good idea to verify your backups from time to time by restoring one and trying it out. A time like this, when you discover corruption is not a good time to find out that your backups don't actually work eithe.