473,508 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unknown Form Load Error

When loading my project i get the following error message.

The form referred to itself during construction from a default instance,
which led to infinite recursion. Within the Form's constructor refer to the
from using "Me.".

I have a main form named frmMain. I have another form named frmProjects.
Within the form frmProjects I have a combo box event called
_EditValueChanged, which makes a call back to a Public Procedure in frmMain
called frmMain.sDisplayProjects, which display values on the frmProjects form
from the frmMain form. I am also doing a similar thing in a form named
frmGroups.

What I noticed is if I comment out the code in my _EditValueChanged event on
the frmProjects from, the error goes away. Is it illigal to have a event in
one form call a Public Procedure in another form that in turn populates
controls in the calling form?

I hope what I have said makes some sense.
Oct 1 '07 #1
1 2278
It sounds like you have code in the constructor that probably should not be
there.

In the ComboBox_SelectedIndexChanged event procedure you can
Create a reference to frmMain using the modForms hashtable that I described
in my other response.

dim Fmain as form = modForms.Forms("frmMain")

You would have a friend or public function in FMain that takes one or more
parameters which indicate to the function what you need, and the function
will be written to return the data needed by your project form...as an
ArrayList, or whatever object serves your purposes.

Friend Function GetProjectData(ComboItem as String) as ArrayList
dim ProjList as new ArrayList
'Add code to get the data you need
Return ProjList
End Function

Then you can call the function from your project form, get the return value,
and handle the data from within the project form.

Don't try to manage your project form from within the main form...just get
the data you need using the function, and manage the data from within the
project form.

"Greg" wrote:
When loading my project i get the following error message.

The form referred to itself during construction from a default instance,
which led to infinite recursion. Within the Form's constructor refer to the
from using "Me.".

I have a main form named frmMain. I have another form named frmProjects.
Within the form frmProjects I have a combo box event called
_EditValueChanged, which makes a call back to a Public Procedure in frmMain
called frmMain.sDisplayProjects, which display values on the frmProjects form
from the frmMain form. I am also doing a similar thing in a form named
frmGroups.

What I noticed is if I comment out the code in my _EditValueChanged event on
the frmProjects from, the error goes away. Is it illigal to have a event in
one form call a Public Procedure in another form that in turn populates
controls in the calling form?

I hope what I have said makes some sense.
Oct 1 '07 #2

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

Similar topics

1
20603
by: Stefan | last post by:
Hi, I just downloaded PHP-4.3.3 for win32 and got the extensions folder and dropped it intot he root of the PHP directory and set it's path in the PHP.ini: extension_dir =...
53
5656
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
1
8025
by: Torrent | last post by:
The Following is an Error I am getting using VS.NET 2003. When I bind the XML and XSLT Document together in Internet Explorer it works fine. However when I attempt to Load the File with the...
3
5199
by: Torrent | last post by:
When Trying to Load an XSLT File with the XslTransform i got a rather annoying Exception being thrown "System.Xml.XPath.XPathException: XsltContext is needed for this query because of an unknown...
6
3831
by: delusion7 | last post by:
I keep getting this error and/or similar errors. I am very new to mysql and php. "PHP Warning: Unknown(): Unable to load dynamic library './php_mysqli.dll' - The specified module could not be...
7
37995
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
10
15301
by: sara | last post by:
Hi - I have been struggling with solution ideas for this now for almost 2 weeks, and have not been able to figure this out. I have a user who creates a Purchase Order (tblPOData). In some...
1
7758
by: Valli | last post by:
Hi, I have an issue with the content page('default.aspx') while executing the asp.net project. I am getting the error 1. unknown server tag 'asp.Scriptmanager' 2. unknown server tag...
0
7228
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
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
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...
0
7502
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...
1
5057
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...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
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 ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.