VBA portion of Access no longer working

G

Guest

My database was created in Access 2000.
I copied an existing form with a button which, when clicked, ran an event
procedure to run a report. The original form was working fine.
When I deleted the button on the new form and tried to recreate with the
command button wizard, received error msg. When click OK, brought to VB
editor however the screen is blank - cannot see the event procedure code.
Toolbox is no longer working and database appears to be corrupted.
Has anyone else experienced the loss of VB functionality in Access 2000 -
any ideas on a fix. My company reloaded the entire Office 2000 product with
no success.
 
A

Allen Browne

If the VBA window still works fine for other forms (or even other database
files), then it does sound like a corruption.

The most likely culprit is Name AutoCorrect, as described in this article:
http://members.iinet.net.au/~allenbrowne/bug-03.html

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect.

2. Close Access. Make a backup copy of your database, so you get multiple
chances at recovering it.

3. Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Compact the database:
Tools | Database Utilities | Compact.

You may lose all the code associated with this form. If so, you may be able
to open an older copy of the database, select all the code in the module,
and try pasting it into the module to recover it.

If you are still stuck at this point, get Access to rebuild the database for
you by following the steps for the first symptom in this article
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top