Object not set

pachjo

Well-known member
Joined
Dec 12, 2006
Messages
370
Programming Experience
10+
I have found many examples on how to use the datarow.find method and have entered as follows but I keep getting the exception "object not set to an instance"?

VB.NET:
Dim a(2) As Object

a(0) = Me.dgvPurchaseOrders.CurrentRow.Cells(0).Value
a(1) = Me.dgvPurchaseOrders.CurrentRow.Cells(4).Value
a(2) = Me.dgvPurchaseOrders.CurrentRow.Cells(6).Value

Me.ds.purchase_orders.Rows.Find(a).Item("delivered") = blnDelivered

the error happens on the .find lines.
the debugger shows that a() has the three values of the primary key set in the assignment lines and blnDelivered equals True.

I cannot see where it is going wrong, all the examples I have found so far look like this?
 
hi, thanks.

Turns out I had a typo in my code which was pointing to another object of a similar name!

what a plonker!
 
Back
Top