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

how to determine if a item sold Greater Than quantity

$
0
0
im trying to see if the InvSold is much then the InvQuantity and display a msgbox that the user cant purchase
beacuse there is not enough items in the inventory.
i tried this code but something is missing
Code:

Set rs = CN.Execute("SELECT InvSold ,InvQuantity FROM Inventory WHERE InvID= " & FrmInventory.LsVw.SelectedItem.Tag)
       
        If rs!Invsold >= rs!InvQuantity Then
        MsgBox "there is not enough items to purchase for the customer"
        End If


Viewing all articles
Browse latest Browse all 21096

Trending Articles