Error opening form

"an error occurred creating the form"

Page 1 of 1

4 Replies - 5067 Views - Last Post: 10 March 2011 - 04:59 PM Rate Topic: -----

#1 McMahon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 09-January 09

Error opening form

Posted 18 February 2009 - 04:38 AM

Hi, I keep getting the following error when I run my project and click on the button that opens frmAbsentees;

"An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object."

I don't get this error opening any other form. I've deleted the form several times and recreated it but this error keeps showing up.

I've created other forms since and they work fine.

I don't understand this error. As soon as I put some bit of code behind the form the error comes up.

I was getting this error last weekend aswell on another form but once I deleted it and made from scratch again, it was fine.

This error only really came about since I started dealing with datagridviews, if that has anything to do with it??

I can show you code if you want but I think its something more than that.

Does anyone know what's going on?
Any suggestions??

Is This A Good Question/Topic? 0
  • +

Replies To: Error opening form

#2 Sethro117  Icon User is offline

  • Still the sexiest mofo.
  • member icon

Reputation: 236
  • View blog
  • Posts: 2,378
  • Joined: 14-January 09

Re: Error opening form

Posted 18 February 2009 - 05:25 AM

View PostMcMahon, on 18 Feb, 2009 - 03:38 AM, said:

Hi, I keep getting the following error when I run my project and click on the button that opens frmAbsentees;

"An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object."

I don't get this error opening any other form. I've deleted the form several times and recreated it but this error keeps showing up.

I've created other forms since and they work fine.

I don't understand this error. As soon as I put some bit of code behind the form the error comes up.

I was getting this error last weekend aswell on another form but once I deleted it and made from scratch again, it was fine.

This error only really came about since I started dealing with datagridviews, if that has anything to do with it??

I can show you code if you want but I think its something more than that.

Does anyone know what's going on?
Any suggestions??



Ive had it where Ill have a form named Form2 in my code for the button to open it Ill put Form2.Show, then Ill go back and change the name of form2 to something else. Most of the time it will update the instances of Form2 in my code to the new form name but there have been a couple where it hasnt and Id get the same error.
Was This Post Helpful? 0
  • +
  • -

#3 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Error opening form

Posted 18 February 2009 - 12:18 PM

Post the code that is relevant to the error message you are getting.
Was This Post Helpful? 0
  • +
  • -

#4 pr4y  Icon User is offline

  • Location: 127.0.0.1
  • member icon

Reputation: 35
  • View blog
  • Posts: 621
  • Joined: 19-September 08

Re: Error opening form

Posted 18 February 2009 - 12:20 PM

If it is a project issue (which is seems most likely) then could you also attach the project files?

Thanks.
Was This Post Helpful? 0
  • +
  • -

#5 rj timtim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 10-March 11

Re: Error opening form

Posted 10 March 2011 - 04:59 PM

rj tim, on 11 March 2010 - 07:42AM, said:

Helo sir, good day!

I got the same error as you have said. Regarding with this, i would like to ask if have you already know the causes of this kind of error.

"An error occurred creating the form. See Exception.InnerException for details. The error is: Argument 'Expression' cannot be converted to type 'TextBox'."


I'm trying to make another forms but the error still remain. And i also changed the name of the forms but still its the same.

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1