473,837 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9710
"Dennis" <dj********@gma il.comwrote in message
news:11******** **************@ g4g2000hsf.goog legroups.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
2465
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 on computers running WinXP. This does not appear to happen in Access 2000 on a computer with Win2000. This only seems to happen if there is a hidden form also loaded and, so far, I'm only able to reproduce this if the forms are loaded through...
6
6020
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 of the Control class, as this should get inherited down to all of the controls. Two questions: 1. Is this possible? 2. What's the simplest, most elegant way to do it?
1
2805
by: Marcel Balcarek | last post by:
I create a user control dynamically: Dim newCriteriaControl As CriteriaTextBoxUserControl = CType(Me._page.LoadControl("CriteriaTextBoxUserControl.ascx"), CriteriaTextBoxUserControl) myContainer.Add(newCriteriaControl) and the user control's load event executes on initial executon of the page. On a POST of the same page, the control is added as above, but the load event is not firing, nor is prerender.
5
4935
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 perfectly. I can't find any documentation regarding the load event not firing when a form is displayed using the showdialog method.
3
3996
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 comboboxes etc I then want to select a particular combobox index and call routines within the form before showing it dialog
6
11435
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, among others). Sometimes that code includes retrieving information from a database. Now that I'm doing this in C# 2005, I realized that I can put that code either in Form load event or in the constructor of the form after the...
2
2954
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 which causes zz as expected the second showdialog(formx) causes 1 form_load event which causes zz as expected
8
3163
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 for clarity it struck me that I could just have well put this code in the forms constructor. The code simply populates text boxes etc... on the form with values. So i wondered as a rule of thumb is it generally better to do things like...
1
3164
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 application and when I select Close from the icon's right click menu the system tray icon goes away and the application is removed from the listing on the processes tab of task manager. My problem is that the FileSystemWatcher event does not work....
0
9847
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10280
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7824
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7012
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4481
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.