G
Guest
Before saving information in a datagridview to a database I'm trying to
verify tha certain cells are not blank (dbNull). When I run this code:
If IsDBNull(Me.dgvHistory(2, Me.dgvHistory.CurrentCell.RowIndex).Value)
Then
Me.dgvHistory(2, Me.dgvHistory.CurrentCell.RowIndex).Value =
Nothing
End If
This error apears when the first line is executed:
System.NullReferenceException
{"Object reference not set to an instance of an object."}
I've spent a few hours work on this, but nothis seems to work. Any
suggestions would be greatly appreciated.
verify tha certain cells are not blank (dbNull). When I run this code:
If IsDBNull(Me.dgvHistory(2, Me.dgvHistory.CurrentCell.RowIndex).Value)
Then
Me.dgvHistory(2, Me.dgvHistory.CurrentCell.RowIndex).Value =
Nothing
End If
This error apears when the first line is executed:
System.NullReferenceException
{"Object reference not set to an instance of an object."}
I've spent a few hours work on this, but nothis seems to work. Any
suggestions would be greatly appreciated.