Hi Tom,
It sounds like it could be VB Project corruption. First, try a decompile.
To decompile an Access project
1. Back up your MDB file.
2. Rename your AutoExec macro, so it won't run on startup.
3. Locate your copy of MSAccess.exe, and make a shortcut to it.
4. Edit the shourtcut, and add " /Decompile" to the end of the command line.
5. Drag your mdb file to the shortcut.
6. Repair and Compact the database.
7. Go to the code editor, compile the code, and save it.
This fixes VB project corruption about 85% of the time. For the other 15
percent of the time, you have to import all the objects into a new database
(not including code modules), then copy and paste the text from the old
project's code modules into the modules in the new project. To delete modules
from forms and reports (in a copy - not your original) before importing into
the new copy for repair, edit each form/report, and change the Has Module
property to "No".
On 18 Sep 2004 23:24:45 -0700,
tchidwickjr@comcast.net (Tom Chidwick) wrote:
[color=blue]
>Hello,
>
>I've custom-built a fairly extensive object model that is designed to
>run in the background
>and control the opening and closing of related forms. The whole thing
>kicks-off with an
>AutoExec macro at startup, using a RunCode action that calls a global
>function and the
>rest works great. Pretty good stuff - flies like an eagle, when it
>works.
>
>Here's were the ugliness starts. Sometimes it works great. Sometimes
>it works great
>but the macro throws an error, even though my code completes.
>Sometimes my code
>just breaks into debug mode for no reason. Sometimes the .mdb
>crashes. Sometimes
>the Access application blows-up (and I get to choose whether or not to
>advise Microsoft -
>love that part). There is no apparent reason or predictability to any
>of it.
>
>I've looked pretty closely at DB corruption and memory leaks. I've
>tested the code for
>weeks now. My code is pretty sound. Step-through ALWAYS works fine -
>no errors.
>
>Does anybody have any suggestions on the cause of the apparent macro
>failure?
>
>Thanks in advance for your ideas!
>
>Sincerely,
>
>Tom[/color]