update query error message

mdlister

New member
Local time
Today, 06:32
Joined
Jul 11, 2006
Messages
9
Trying to create a query that will look up a barcode and subtract 1 from the currnet stock levels, i have the exact same sql statement for the adding of stock part from the -1 to a +1 the relised i may need a gap between the "-" and the 1 but it still comes up with the message. Anyone got an idea how i can make this work??

UPDATE table1 SET table1.quantity = "quantity - 1"
WHERE (((table1.barcode)=[Barcode please]));


Microsoft office access didn't update 1 field due to a type conversion failure, 0 record(s) due to key violation, 0 records due to lock violaation and 0 records due to validation rule violations
 
would the following work?

UPDATE table1 SET table1.quantity = [table1.quantity] - 1
WHERE (((table1.barcode)=[Barcode please]));

Ian
 
Ian ur my hero! works a treat! thanx very much! :D
 

Users who are viewing this thread

Back
Top Bottom