V
Vivek Sharma
Hi,
I have a form in a windows application. In that form I have declared the
public property InvoiceNo. I am trying to access this property from the
other form. In the other form I declared the first form as
public frmInvoice as InvoiceForm
after the declaration I have on load event in which I am trying to access
the property
Private Sub ReportViewer_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dim inv as string
inv = frmInvoice.InvoiceNo
End Sub
I get the error of the Object reference not set to an instance of an object.
Now I can fix it by declaring
public frmInvoice as new InvoiceForm
but then I get frmInvoice.InvoiceNo as NOTHING
Please help
I have a form in a windows application. In that form I have declared the
public property InvoiceNo. I am trying to access this property from the
other form. In the other form I declared the first form as
public frmInvoice as InvoiceForm
after the declaration I have on load event in which I am trying to access
the property
Private Sub ReportViewer_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dim inv as string
inv = frmInvoice.InvoiceNo
End Sub
I get the error of the Object reference not set to an instance of an object.
Now I can fix it by declaring
public frmInvoice as new InvoiceForm
but then I get frmInvoice.InvoiceNo as NOTHING
Please help