Access VBA opens debug Window without error

APD Toronto
APD Toronto used Ask the Experts™
on
Hi Experts,

I have just ran into an odd issue, where when triggering an event, the debug Window opens highliting a line, but no error appears.

Even in the iimidiate window I get

?err.description

?err.number
0

I have tried compact and repair and also compile, the problem persists. However, when I hit F5, the code continues normally.

Any imput will be appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Kind of the Stuck Breakpoint issue.
Quick Fix:  Reboot your system (not kidding).

mx
APD TorontoSoftware Developer

Author

Commented:
Restarted, same issue
Michael CarrilloInformation Systems Manager
Top Expert 2012

Commented:
Two things you can try:

1. Run Windows update to ensure that both Windows and Office are fully updated.  You could have an issue with a shared dll.

2. There are some database corruptions that cannot be corrected with a compact and repair.  In this case you would create a blank database and import all your objects into the new database. Then test your code again in the new database.
APD TorontoSoftware Developer

Author

Commented:
i have everything updated

i opened a blank DB, imported all objects - same
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Did you reboot as I suggested ?

mx
APD TorontoSoftware Developer

Author

Commented:
rebooted twice
Database Architect / Application Developer
Top Expert 2007
Commented:
OK ... Decompile should fix it ... run this procedure:


Open the VBA Editor and from the menu ...Tools>>References ....
If you see any listed as **Missing: <reference name>, including the asterisks and the word Missing, the
you need to fix that first.

Then, follow this procedure:

****
0) **Backup your MDB BEFORE running this procedure**
****
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 ...
Close the mdb after the Compact & 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) Close the mdb.
6) 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.

7) Close the mdb
8) 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) before 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:
Also, the double quotes are required.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.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

AND ...
Once you get familiar with the Decompile idea (and ALWAYS make a BACKUP first!) ... you can add both Decompile and Compact/Repair to the Right Click menus in Windows Explorer, which I use multiple times daily:

Getting the Decompile and Compact context menu options
http://access.mvps.org/access/modules/mdl0039.htm

mx

mx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial