Update Inventory Totals in a Microsoft Access Continuous Form
Question details
Calculate and display inventory totals from transaction data in a Microsoft Access continuous form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user wants to see received, sold, and on-hand quantities as inventory transactions change.
- Observed behavior
- Inventory totals should reflect the transaction records rather than be stored separately in individual records.
Identify the transaction table and its product, incoming quantity, and outgoing quantity fields. Confirm whether you need totals for each product or a total of a field displayed in the form.
Calculate inventory on hand with an Access totals query
Use a grouped query to calculate received, sold, and on-hand quantities for each product.
The example assumes incoming and outgoing quantities are stored as positive numbers in separate numeric fields. Replace the table and field names with those used in your database.
A grouped totals query is generally read-only, so use it to display totals rather than as the form used to edit transactions.
In Access, select Create > Query Design, then switch to SQL View.
Enter: SELECT ProductID, Sum(Nz(Incoming,0)) AS Received, Sum(Nz(Outgoing,0)) AS Sold, Sum(Nz(Incoming,0))-Sum(Nz(Outgoing,0)) AS QOH FROM Transactions GROUP BY ProductID;
Select Run to check the results, then save the query with a name such as InventoryTotals.
Use the saved query as the record source of a separate continuous form or subform. After saving transaction changes, requery that form or subform so it displays updated totals.

Show a field total in the continuous form footer
Use a footer control when you need to total a quantity field across the form's records.
Review exported inventory data in WPS Spreadsheets
WPS Office is a free, lightweight, easy-to-use Office alternative with a familiar interface and Microsoft Office format compatibility. Export Access query results to an Excel workbook to review inventory figures in WPS Spreadsheets; WPS does not replace Access forms or fix Access database behavior.

Frequently Asked Questions
Why should quantity on hand be calculated instead of stored?
Calculating it from incoming and outgoing transactions in a totals query reduces the risk of a stored balance getting out of sync with those records.
How do I update the displayed totals after changing a transaction?
Save the transaction, then requery the form or subform that displays the totals query. A simple refresh may not rerun the grouped query.
Can I edit transactions directly in the grouped totals query?
Grouped totals queries are generally read-only. Edit transactions in a separate table-bound form and use the totals query to display the calculated results.
Does a form footer sum show totals for every product?
A footer expression such as =Sum([Qty]) totals that field across the form's current record set. Use a query grouped by ProductID when you need a separate total for each product.




