Updating fields using a query?

Joined
Dec 17, 2013
Messages
37
Hi,

I am currently creating an inventory for stock. I have got a product table which has a stock field and i have a order table which will be updated through both manual input and order reports that will be pulled through from excel. What I would like to do is to subtract the stock away in the product table using the quantity ordered field in the order table based on which items have been ordered. I have linked up the tables using a primary and foreign key so is there anything else i will need to do to make sure that the appropriate records are being subtracted i.e if there is 50 of product A in stock, when an order for 10 of product A comes through the stock level will drop to 40 in the product table.

Thanks in advance,

Heyyouyesyounonotyouyou
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top