im trying to check in my inventory if a item of a supplier is been sold and cannot be deleted
this is my code
i tried some methods but not working proper.
i have 2 suppliers in the suppliers table when i add another supplier that i even didnt order from yet it show me the msgbox
"this supplier cant be deleted beacuse you already sold one of his products"
if any info is needed i will add on
regards salsa31
this is my code
Code:
LsVw.SetFocus
Set rs = CN.Execute("SELECT InvID,InvSupplier,InvReman,InvQuantity FROM Inventory WHERE InvID= " & (FrmInventory.LsVw.SelectedItem.Tag))
If rs!InvRemain < rs!InvQuantity Then
MsgBox "this supplier cant be deleted beacuse you already sold one of his products", _
vbExclamation, LsVw.SelectedItem.text
Exit Sub
End If
i have 2 suppliers in the suppliers table when i add another supplier that i even didnt order from yet it show me the msgbox
"this supplier cant be deleted beacuse you already sold one of his products"
if any info is needed i will add on
regards salsa31