Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21870

how to check if a item of a supplier is already been sold

$
0
0
im trying to check in my inventory if a item of a supplier is been sold and cannot be deleted


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 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

Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>