Can't open source - Microsoft Access had encountered a problem and needs to close

I am running Access 2003 on XP 2002 SP2. Something wierd is happening. I have an ADP file that I have been working with for several years. Just today, when I attempt to open any module or form source code. I get an error: "Microsoft Office Access has encountered a problem and needs to close ...". It continually does this, even after reboot. I can do no work at all. What is going on? How do I get around this?

This is fairly urgent because 1099 tax forms need to be printed out of this system by tomorrow!!!
LVL 1
MarkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

tonydemarcoCommented:
Try holding down the shift key while opening the file.
Then go to tools database utilities "compact repair"
0
MarkAuthor Commented:
Compact Repair did not work; still gave me the error message and termianted whenever I tried to open any source. But I did get it working. Here's what I did: The last thing I did before this started happening was to make a minor VBA code change to a module (in fact, very minor - I just changed the contents of a string used in a query). I reasoned that there must be something wrong with this module. So, I opened up a new database and did a cut on the module in the misbehaving database and pasted it into the new database. In the new database I was finally able to open the module source code. I copied the VBA code and pasted it to a notepad txt. I then closed everything and opened the original database (now missing this module). I created a new module and simply pasted the contents of my paste bufferinto this new module. I saved and renamed the module to the original name and, voila! problem gone. I am able to compile to an ADE and open all sources again. I have no idea what the problem was. I made no changes to the module source. Who knows!
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Try the full procedure below:

A **DeCompile** may help here ...

But first, if you have not already:
Check for any **Missing References via the VBA Editor>>Tools>>References ....

Then, follow this procedure:

0) **Backup your MDB**
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
       >>Debug>>Compile
        Note ... after the word Compile ...you will see the name of your 'Project' - just an fyi.

6) Close the mdb
7) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an example of the command line syntax  (be SURE to adjust your path and file name accordingly) for executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\AzDoc\Pgrm\AzDocPgrm2K3.mdb"

For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:

http://www.trigeminal.com/usenet/usenet004.asp?1033

mx
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Before doing any more work on this database, I'd strongly encourage you to move your objects to a new database container. Even though it's "fixed", you obviously have some issues with the vba container.

Open Access, then open a new, blank database. Import all your objects from the problem db. Remake you references, if necessary, then compact and repair this one. Make a copy of this new database, then go back to development.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
And if you make a new MDB, then run the full Decompile procedure.

mx
0
Computer101Commented:
PAQed with points refunded (500)

Computer101
EE Admin
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
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.