I have a form that is used for creating orders of products on my database. My goal is to subtract the order.quantity field from the stock.stock_qua ntity field through the use of an update query. In order to target the specfic stock record, when the customer picks which stock they want in the order form, I use the order.stock_id field to pick which stock record I target.
The problem is that when I try and reference the form in my update query nothing happens, I simply get a prompt when I execute it saying "You are about to update 0 row(s)", I've tried taking out the "Where" clause from my query and it will subtract 1 from all the stock.stock_qua ntity records so I know its not a problem with the SET clause.
The full SQL for my UpdateStock query is as follows:
I've looked at multiple YT videos and even the offical microsoft access guides for this and so I think I have the right syntax. Any help is appreciated!
The problem is that when I try and reference the form in my update query nothing happens, I simply get a prompt when I execute it saying "You are about to update 0 row(s)", I've tried taking out the "Where" clause from my query and it will subtract 1 from all the stock.stock_qua ntity records so I know its not a problem with the SET clause.
The full SQL for my UpdateStock query is as follows:
Code:
UPDATE stock SET stock.stock_quantity = [stock]![stock_quantity]-1 WHERE (((stock.stock_id)=[Forms]![OrderForm]![stock_id]));
Comment