adding "1" to the quantity from a barcode

mdlister

New member
Local time
Today, 18:20
Joined
Jul 11, 2006
Messages
9
UPDATE Table1 SET Table1.quantity = [table1]![quantity]+1
WHERE (((Table1.barcode)=[enter barcode]));

is this query string rite to add a number to the stock of a certian barcode and what kind of validation can be done to check if the barcode exists?
 
Two things.

1) It's very bad design to store the stock quantity in a table. Do a search in here on stock or inventory to find out why it's better to track goods in and out and calculate the balance when you need it.

2) Instead of using a query prompt for user input, use a combo box on a form and populate it with a query that retrieves valid barcodes from your product file.
 

Users who are viewing this thread

Back
Top Bottom