Others

Track Inventory by Lot and Expiry Date in Microsoft Access

Khadija KhanKhadija Khan Nov 25, 2026 869 views

Question details

Design an Access inventory database that tracks stock separately for each lot and its expiry date.

Track Inventory by Lot and Expiry Date in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
The user needs to record receipts and issues for individual batches of the same product.
Observed behavior
Available inventory should be calculated by lot rather than stored only as an aggregate product quantity.
Before you start

Review your existing product and inventory tables to identify where item quantities are stored. Decide how you will identify each lot and whether quantities can include fractions.

Solution 1Recommended

Create lot-linked inventory tables and a stock balance query

Use separate product, lot, and transaction records to calculate the available quantity for each batch.

Record receipts as positive quantities and issues as negative quantities. The sum of transactions for a lot is its available balance.

This design calculates stock by lot, but it does not automatically prevent users from issuing more than is available. Add validation or a controlled transaction process if that protection is required.

1
Create a products table

In Access, select Create > Table Design. Add a ProductID AutoNumber primary key and fields such as ProductName, then save the table as Products.

2
Create a lots table

Select Create > Table Design and add a LotID AutoNumber primary key, a ProductID Number field with Field Size set to Long Integer, a LotNumber Short Text field, and an ExpiryDate Date/Time field. Save the table as Lots.

3
Create a transactions table

Create an InventoryTransactions table with a TransactionID AutoNumber primary key, a LotID Number field with Field Size set to Long Integer, a TransactionDate Date/Time field, and a signed Quantity field using a number type suited to your units. Enter receipts as positive quantities and issues as negative quantities.

4
Link the tables

Open Database Tools > Relationships and add the three tables. Link Products.ProductID to Lots.ProductID and Lots.LotID to InventoryTransactions.LotID, selecting Enforce Referential Integrity for each relationship.

5
Record stock by lot

Open the Lots table and add a record for each batch, including its product, lot number, and expiry date. In InventoryTransactions, enter a separate receipt or issue against the corresponding LotID, including any opening stock as a positive transaction.

6
Calculate each lot balance

Select Create > Query Design and add Products, Lots, and InventoryTransactions. Add ProductName, LotNumber, ExpiryDate, and Quantity to the grid, select Totals, and set Quantity to Sum while leaving the other fields as Group By. Run the query to see the balance for each lot with transactions.

Create lot-linked inventory tables and a stock balance query
Include lots without transactions: The default joined query shows lots with matching transactions. To include lots with no transactions, edit the join between Lots and InventoryTransactions to include all Lots records, and treat a null sum as zero.
Free Microsoft Office alternative

Track small lot inventories in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface and Excel-compatible files for a smoother move from Microsoft Office. Use WPS Spreadsheets to maintain a simple lot and expiry register; it does not replace Access relational database features or directly manage Access databases.

List lot numbers, expiry dates, and quantities in a spreadsheetOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet tools for sorting and filteringWork with a lightweight, free Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why should each lot have its own record?

Separate records in the Lots table let the same product have multiple lot numbers and expiry dates. Each transaction can then reference the exact LotID it affects.

How do I reduce stock for a specific lot?

Add an issue record to InventoryTransactions with that lot's LotID and a negative Quantity. The totals query subtracts it from the lot's receipts.

How can I find lots that expire soon?

In Query Design, include ExpiryDate and add a suitable date range in its Criteria row. Run the query and sort ExpiryDate in ascending order.

Will the totals query prevent negative stock?

No. The query reports the sum of recorded transactions but does not block an issue that exceeds the available balance. Use a controlled transaction process with validation if negative stock must be prevented.

Can WPS Office replace the Access database?

WPS Spreadsheets can maintain a simple lot register in an Excel-compatible workbook, but it does not provide Access relational database features or directly manage Access databases.