Private Sub ListView2_Click()
Call d("Select * from Inventory Where ID=" & ListView2.SelectedItem)
If rs!SellingPrice = Null Then
MsgBox "Product's selling price is not set!", vbExclamation, "System"
Exit Sub
End If
Text1.Text = rs!ItemCode
Label4.Caption = rs!ItemName
Label8.Caption = rs!SellingPrice
Label9.Caption = rs!Quantity
Picture1.Visible = False
End Sub
I put an if statement so if the selling price is null, it won't be displayed. But it always read the null and it errors.
Debug line : Label8.Caption = rs!SellingPrice
Run time error '94':
Invalid use of Null
Please help me.
Call d("Select * from Inventory Where ID=" & ListView2.SelectedItem)
If rs!SellingPrice = Null Then
MsgBox "Product's selling price is not set!", vbExclamation, "System"
Exit Sub
End If
Text1.Text = rs!ItemCode
Label4.Caption = rs!ItemName
Label8.Caption = rs!SellingPrice
Label9.Caption = rs!Quantity
Picture1.Visible = False
End Sub
I put an if statement so if the selling price is null, it won't be displayed. But it always read the null and it errors.
Debug line : Label8.Caption = rs!SellingPrice
Run time error '94':
Invalid use of Null
Please help me.