A
Anders
Greetings,
I am looking for the best way to update my inventory on hand for a specific
product after I make a sale. I have a customer form with an order details
subform where I enter my customer/order data. The OD subform has a product
ID as a FK which is the PK of my product table (where the product description
and amount in inventory are held). After I enter an order, I'm looking for
the best way to update the amount in inventory, preferably with an action
button on the same form.
I'm currently trying to create an update query to do this, but 1. want to be
sure this is the best way, 2. if it is, figure out why mine isn't working.
If there is a better way to do this, I'm all ears.
Here is what I've tried with my update query. I set it to ask which product
I'm updating(b/c I have more than one product) (product ID is my PK) and then
I wanted it to ask how many units to reduce the # in inventory column by, but
this isn't working.
UPDATE Products SET Products.[# in Inventory] = [Products]![# in
Inventory]-[enter number of units sold]
WHERE (((Products.ProductID)=[product id]));
Everytime I try to run it, I get nothing but an error in the bottom message
bar "The action or event has been blocked by Disable Mode" - I followed the
help directions for 'trusting' the location of the folder to no avail. So
I'm guessing my formula is wrong?
Thanks in advance.
Anders
I am looking for the best way to update my inventory on hand for a specific
product after I make a sale. I have a customer form with an order details
subform where I enter my customer/order data. The OD subform has a product
ID as a FK which is the PK of my product table (where the product description
and amount in inventory are held). After I enter an order, I'm looking for
the best way to update the amount in inventory, preferably with an action
button on the same form.
I'm currently trying to create an update query to do this, but 1. want to be
sure this is the best way, 2. if it is, figure out why mine isn't working.
If there is a better way to do this, I'm all ears.
Here is what I've tried with my update query. I set it to ask which product
I'm updating(b/c I have more than one product) (product ID is my PK) and then
I wanted it to ask how many units to reduce the # in inventory column by, but
this isn't working.
UPDATE Products SET Products.[# in Inventory] = [Products]![# in
Inventory]-[enter number of units sold]
WHERE (((Products.ProductID)=[product id]));
Everytime I try to run it, I get nothing but an error in the bottom message
bar "The action or event has been blocked by Disable Mode" - I followed the
help directions for 'trusting' the location of the folder to no avail. So
I'm guessing my formula is wrong?
Thanks in advance.
Anders