"Dennis" <dj********@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
I've noticed some old posts regarding this issue; but nothing recently
and no resolutions in the old postings.
Its almost hard for me to believe that this wouldn't be fixed by now.
I am using Access 2007.
The Forms Load event does not fire when the form is displayed. It
does fire when the next button "On Click" event occurs. I have 5 or 6
buttons, and it doesn't matter which one I press. The actual action
for the button event does not occur until the 2nd press of the button.
Strange; but true.
I have three sub-forms, and some of them have form load events. That
shouldn't really be a factor, I wouldn't think.
And there are no other calls to the Form_Load() routine. I set a
break, and even put a hard coded "stop" in the load event. When the
break finally occurs (on the press of a button) I check the command
stack and there is nothing else in it except for the Form_Load
procedure.
I checked the MS knowledge base and no luck. Its just hard to imagine
that if this problem was reported here 3 years ago, that MS wouldn't
have a fix for it by now -- or at least a KB article.
Anyone know how to fix this?
Dennis
Dennis,
I've run into something similar, sometimes. If I change the name of some
controls, sometimes the event linked to that control gets "lost" somehow. To
fix, I exit the VBA code and return to form design view. Then I select the
properties window of the failing control. Then I cursor down to the
associated event. Normally the event should say [Event Procedure]. But when
it's "lost", the property is blank. So I click on the ellipsis (...) and
select "code builder". That opens the VBA code and re-establishes the link
to my coded event.
For yourself, go to design view, open the properties window of the form (not
an individual control). Scroll down to the "On Load" property. If it's blank
then somehow your code has been "lost". Click the ellipsis, and select "Code
Builder". If it opens VBA and takes you to your code, then you should be
fixed. Choose Debug->Compile, then Save and Exit.
I don't know if this is your problem, but it's and easy few steps and won't
hurt anything. Try it and let us know....
Maybe one of the "regular experts" might chime in and tell me what I do
wrong that cause this to sometimes happen to me...
Fred Zuckerman