1. Does the form use any custom or usercontrols that possibly have
compilation errors ?
2. If the form has DataGridViews, has the binding source or data
source changed ?

If you're trying to open the form in design mode, you will often
encounter such an error if there is a fatal error while trying to
render one of the form components. Trying removing the components one
by one from the Designer.(vb/cs) file and then open the code file and
check for errors.

On Feb 18, 4:40 pm, Laura <[email protected]> wrote:
> 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??

Reply via email to