Glenn: One good way would be to run a update query to solve this. Create an update query that links the orders to the inventory. You will need a new field in the Orders Table (for example, posted or PostedToInventory) make this new field a yesno field. (Remember yes to Access is -1 and No is a Zero (0). Your query will only pick those records with a 0 in the Posted field. Your Quanity will update to: Inventory!Qty = Inventory!Qty - Orders!OrderedAmount.
I will post an example by 4/7/02 to the samle application which can be found at www.expressreferrals.comCALOrderMSA.asp
Terry
--- --- --- --- --- --- --- --- ---
Replying to:
Hello Terry,
Could you tell me the VBA code to automatically decrease a number in a certain record, if a number is increased in another record, e.g. if a new record is created in the orders table, the item ordered is 'Graphics Card' and the quantity ordered is 2, is there any VBA code to automatically decrease the 'quantity available' field in the 'Graphics Card' record in the stock table?