473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Forms Load Event Does Not Work

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

Sep 28 '07 #1
1 9626
"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
Sep 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dlieu | last post by:
I've found an odd situation in where the Load event of the active form fires (after the Unload event) when Access is closed. I am able to reproduce this situation in Access 2002 SP3 and Access 2003...
6
by: Robert Werner | last post by:
I want to write one general purpose set of code that will handle the population (where required) of all controls on a form. Though I'm new to C# my instinct is to somehow hook into the Load event...
1
by: Marcel Balcarek | last post by:
I create a user control dynamically: Dim newCriteriaControl As CriteriaTextBoxUserControl = CType(Me._page.LoadControl("CriteriaTextBoxUserControl.ascx"), CriteriaTextBoxUserControl) ...
5
by: Engineerik | last post by:
I have a login form which I want to display with the showdialog method. When I do that the event handler for the load event does not run. If I use the show method the load event handler runs...
3
by: steve | last post by:
Hi All I need help on how to load a form in the background so the load event runs (only once) then I can pass data and call showdialog I have code in the forms load event which populates...
6
by: Rolandpish | last post by:
Hi there. I'm doing an application in C# 2005. I was used in VB6 to put code in Forms load event in order to initialize some values of the controls (grid values, text boxes values, label captions,...
2
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
8
by: garyusenet | last post by:
I was originally taught to double click the form, to get to the load event handler and in there put anything I want to happen when my form is opened. However, today whilst reorganising some code...
1
by: Lila Godel | last post by:
My VB.NET 2008 application is setup with a Sub Main and no forms. At run time a NotifyIcon is created with one context menu choice (Close which terminates app). I have no trouble running the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.