Question Code not fired first time form opens after startup, but does after closing/reopen

CraigDolphin

GrumpyOldMan in Training
Local time
Yesterday, 23:50
Joined
Dec 21, 2005
Messages
1,578
Hi,

this has me baffled. Not sure if it is a vba thing, a form thing, or something else.

I have a single user AC2K database with a Menu form set to open on startup.

When the database is opened, the Menu form opens correctly but none of the VBA code in various events associated with command buttons will fire when they are clicked.

If I close the form manually, then re-open it, then everything works perfectly as expected. :confused:

-----------------
What I've done to try to track this issue down:
*Tried a message box in the form's on_current event to see if it's something in the other code. The same happens with that. The on_current event does not fire when the form first opens, but does the second time the form opens.

*compiled the code (no errors found)

*Tried opening the db without the form opening automatically at startup, then manually opening the form (same result as original problem...first time it's a dud)

*Searched the forum for similar posts without much success

--------------

So...has anyone else run into anything like this before or am I just SOL? Any response is much appreciated :)
 
If you have not already done so, try importing into a fresh db and then Compact and Repair.
 
Okay. I should have thought of that! :o

Thanks RuralGuy....that seems to have done the trick! Must have been some corruption creeping into the form I guess. Odd

Once again you save the day :)
 

Users who are viewing this thread

Back
Top Bottom