I have a form which allows you to select the records. What I'm trying to do is be able to click a button which opens another form, and displays some parts of the selected record.
I have tried the following code in the Form_Load event and the Form_Activated event, but wherever I put it, I get the object reference error on load of the form.
The only thing I thought it could be was the declaration, but can't see what's wrong with it.
Someone help please,
Thanks
I have tried the following code in the Form_Load event and the Form_Activated event, but wherever I put it, I get the object reference error on load of the form.
VB.NET:
Dim ds As New DataSet
ds = basVehicles.getVehicles
Try
lblBuyMake.Text = ds.Tables(0).Rows(0).Item("Make").ToString
lblBuyModel.Text = ds.Tables(0).Rows(0).Item("Model").ToString
lblBuyPrice.Text = ds.Tables(0).Rows(0).Item("Price").ToString
'pbVehicleImage.Text = ds.Tables(0).Rows(0).Item("Picture").ToString
Catch ex As Exception
MsgBox(ex.Message)
End Try
Someone help please,
Thanks