Why does Ms-Access 2003 Visual Basic Editor stop responding when I type 'Enum' in vba-code?

Hello.

I am writing a visual basic application using ms-access 2003 and vba, and have this problem:
Whenever I write 'Enum' in the visual basic editor code, ms-access freezes completely and stops responding. The only thing that shows is a complete white window with in the title bar 'Not Responding'. I cannot even close Ms-Access, so I have to terminate the process using Windows Task Manager. Does anybody know why and have a fix?
TicketManAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Haris DulicCommented:
where did you wrote your code with enum?
Because Enum statement can be only in module
0
TicketManAuthor Commented:
I wrote a simple Enum statement under 'Modules' in MS-Access:
Enum CompanyColors ...and on pressing enter to go to the following line of this statement everything freezes.
I just tried to write it within a public function under Modules (just to test) and now I am getting the same problem after hitting [Enter] behind: Public Function SwitchBackColors(strFormName as string) as Integer. So it seems not only to do with Enum...
In contrast when I just type Dim CompanyDefaultColor as Integer in a Module all is fine, nothing freezes.


 
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Sounds to me like corruption. If I were you I'd immediately make a backup copy of the database, then try this:

1) Compact and Repair (Tools - Database Utilites)
2) Decompile - build a desktop shortcut with this as the Target: "full path to msaccess.exe" "full path to your db" /decompile
3) Import all into a new, blank database

If those don't work, you may have to work from a backup, or have a recovery service try and save your project.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TicketManAuthor Commented:
Thank you very much for your help! Excellent.
0
TicketManAuthor Commented:

Thank you! You are right, it was corrupt. Decompiling as you mentioned solved it nicely.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.