473,320 Members | 1,881 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,320 software developers and data experts.

User Control Error

Hello
I have create a custom user control and added the project
into another project. It created a tab 'My User Controls'
and added a reference. When i drag the control on a form
i get the following error :

An exception occurred while trying to an instance of
ArtigosArmazem.UserControl1. The exception was "Object
reference not set to an instance of an object.".

Any suggestion on what i am doing wrong would be most
welcome, thank you.

Kind Regards
Jorge Cavalheiro

Nov 20 '05 #1
1 971
When using a control some of your code may run even though
your in design mode (the control is already in semi-run
mode).

You probably have some things in your control constructor.

Try put something like
If not Me.DesignMode in your control constructor and
figure it out from there.

Nov 20 '05 #2

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

Similar topics

4
by: patrick_a | last post by:
Hello, I am trying to insert multiple instances of a custom user control into a placeholder on an aspx page, based on the records retrieved from the database. I use the datareader to loop through...
5
by: Simon Harris | last post by:
Hi All, I am trying to call a method in a web form, from an event fired in a user control. My user control displays a map, which has a link button to enlarge/shrink the map. When the user...
0
by: Tom | last post by:
I am having a really annoying issue with serialization and a .NET User Control I am writing. For example, let's say I have a couple of classes in my control - first class is like: Public Class...
4
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
5
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
4
by: bill | last post by:
I have a Repeater control in a web user control. The web user control has a public method named PopulateRepeater which takes an ID as an parameter and populates the repeater control based on the...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
0
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
9
by: abprules | last post by:
Can somehow tell me the best way for multi user development to occur in MS Access? The situation is: We are creating a new database for a small company. There are 2 of us who want to...
1
by: Efi Merdler | last post by:
Hi, I created a user control, but instead of handling exception in the user control level I prefer to handle them in the containing form. In the load event of the containing form I'm using:...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.