Error VBA?

tonycicc20

New member
Local time
Today, 15:32
Joined
May 4, 2021
Messages
22
Tried opening this DB yesterday and it worked just fine. Tried this morning and got this??

hbh.jpg
 
That's why you should always keep regular backups. If you have one, just go back to previous version.
 
occasionally a database will corrupt. (backup regularly), then THIS messages shows, it will erase ALL vb code, making the db useless.

restore from backup.
 
even the old one is saying the same? i dont understand why it keeps getting corrupted
 
What it is saying is that the prior version already was corrupted but not obviously so. When you open the corrupted backup, whatever was bad is still bad so increases the corruption.

Let's look at the DB's usage. Who uses this other than you? Is it shared? If so, is it a split database? Tell us about its usage, because the most common cause of corruption is incorrect sharing.
 
I got lucky a couple of times with this error. I had a slightly different Access version at home than at the office and was able to open the FE at home and recover it. For some reason that I never discovered, this one database corrupted frequently. I exported all the objects and rebuilt it a dozen times. I used the decompile until my hands bled. NOTHING worked. This database contained a demon and it reared its ugly head at least twice a week It finally drove me to create code that exported all the objects to text when I closed the database so if I came in the next morning and got that blasted message, I had a restore point ready to go.

I can post the code if you are interested but unless you luck out like I did, you are SOL until you find a backup that isn't corrupted. Also, check when Access got updated. Sometimes a new version fails because it is more strict about a sloppy piece of code. There is also a person we can recommend who might be able to recover the database for you and I think Jon, the owner of this site might also do recoveries.
 
Last edited:
This is so weird.............I had that exact problem a few days ago, for the first time in as long as I can remember, too.
On a client virtual server I was remoted into.

I had recently installed a fresh Office 2010 desktop.

I started getting this error even when I made a new blank database and tried to drag a Combobox onto the form in design view - so obviously it had nothing to do with a specific database corruption (which at first was what I assumed as well).

My next step was an Office "Repair" (add/change programs, find Office, Modify, Repair), which did absolutely no good.
I then noticed I had excluded "Add Ins" from the Access install, so I modified the install to include that - also didn't change anything.

I then uninstalled Office totally, reinstalled Office, and things worked fine. Very scary stuff, considering that was about the end-of-the-road in troubleshooting to my knowledge.

If you can prove it's not isolated to one database but keeps happening on multiple 'new' ones...........try reinstalling Office.
 

Users who are viewing this thread

Back
Top Bottom