Update table field from records in subform

Luigi_Cortisone

Registered User.
Local time
Today, 19:49
Joined
Dec 10, 2008
Messages
24
Hi, I have a table 'Widgets' with a numeric field 'Inventory' that stores the number of widgets in stock. An 'Orders' form has a 'WidgetOrders' sub form which is used to record the widgets for that order. Each record on the subform has an 'OrderID' and 'WidgetID' control

When a checkbox 'txtOrderFilled' on the main form (frmOrders) is checked, the 'Widgets.Inventory' is to be reduced by 1 for each widget on the orders sub form (subfrmWidgetOrders)

Any help with this is much appreciated

Cheers, Luigi
 
the correct procedure is not to store the .inventory quantity

calculate it from the transactions each time you need it.
 
Yes, I agree this may be the correct approach but on this occasion I would like to store the calculated value

Are you able to assist with the request?

Cheers, L
 

Users who are viewing this thread

Back
Top Bottom