Hello,
I have a combo box on an order form which the user can purchase products.
Now what i want to do is when the user chooses a product, and wants to buy more, when the drop down is clicked that same product they have bought should not appear in the drop down list.
To do this, In my product table I have got a 'Chosen' field which has a tick box for yes / no.
Now this is the following code i am trying to use to update my table once the product has been added into the shopping basket so it doesnt show again.
Code:
db.Execute "UPDATE tblProduct SET Chosen = True WHERE ProductID = " & cmbProductID
lstOrder.Requery
cmbProductID.Requery
lstOrder is my Listbox which updates everytime the user prses 'Add' it drops into the listbox to show what they are going to buy.
This is not working:
e.g customer purchases productID 5. Customer wants to buy another item and clicks the drop down. ProductID 5 should not be in the drop down.
But atm my code is not doing that and the item is still showing.
Can anyone tell me how i can code this so the product thats already been bought doesnt show up again?
Thanks in advance.