Microsoft Office

How To Create A Stock Management Database In Microsoft Access

To create a stock management database in Microsoft Access, build related tables for products, suppliers and stock movements, then add forms for data entry and queries for stock balances. Record receipts, sales and adjustments as movements so you can trace changes. Finish with low-stock reports.

Which licences fit your PC setup?

Prices are an AUD snapshot, not a live quote. Confirm variant and total on the listing.

Plan what the database needs to track

Start with a single stock location and a consistent unit for each product, such as individual items or metres. Decide how staff will record deliveries, dispatches, returns and stocktake adjustments. A customer order should reduce physical stock when goods leave, rather than simply when the order is entered.

Check that Access is installed and available under your licence. If Office setup needs attention, consult the guides to Office activation using Command Prompt and finding an Office product key using Command Prompt, checking their applicability to your installation and licence type.

Create the database and its tables

  1. Open Access, choose Blank database, enter a name such as StockManagement.accdb and select a save location.
  2. Choose Create, then Table Design. Enter each field name and data type.
  3. Select the identifier field and choose Primary Key. Save the table with its planned name.
  4. Repeat for the remaining tables, using the structure below as a starting point.

This design assumes one preferred supplier per product. Store the current balance in a query rather than maintaining separate quantity fields in several tables.

Table Fields and data types Purpose
tblSuppliers SupplierID: AutoNumber, primary key; SupplierName, Email, Phone: Short Text Stores supplier contact details once.
tblProducts ProductID: AutoNumber, primary key; SKU, ProductName, StockUnit: Short Text; SupplierID: Number, Long Integer; ReorderLevel: Number; UnitCost, SellingPrice: Currency Identifies products and their preferred supplier.
tblStockMovements MovementID: AutoNumber, primary key; ProductID: Number, Long Integer; MovementDate: Date/Time; QuantityChange: Number; MovementType, Reference: Short Text Records each increase or decrease in physical stock.

Use Long Integer for quantities counted in whole units. For measured stock, choose a numeric field size that supports the fractional precision you need, consistently across QuantityChange and ReorderLevel. Use Short Text for telephone numbers and SKUs to preserve leading zeroes.

Set SKU to Required and Indexed: Yes (No Duplicates). Require ProductName, MovementDate, ProductID and QuantityChange in their respective tables. Remove the default zero from foreign key fields: zero is not a substitute for a valid supplier or product.

Connect the tables with valid relationships

  1. Open Database Tools, then Relationships, and add the three tables.
  2. Drag tblSuppliers.SupplierID onto tblProducts.SupplierID.
  3. Select Enforce Referential Integrity and create the relationship.
  4. Connect tblProducts.ProductID to tblStockMovements.ProductID in the same way, then save the layout.

Both relationships are one-to-many: a supplier can supply several products, and a product can have several movements. The related Number fields must use Long Integer to match the default AutoNumber keys. Referential integrity prevents references to missing records; Microsoft's relationship instructions explain the settings. Leave cascade deletion disabled to protect movement history.

If products have multiple suppliers, introduce a ProductSuppliers junction table containing ProductID and SupplierID, with the pair unique. If you add customer orders, use separate Orders and OrderLines tables: an order can contain several products, and a product can appear on several orders.

Record movements and calculate stock on hand

Enter the starting physical count as an opening movement for each product. Use positive QuantityChange values for receipts and customer returns, and negative values for dispatches, supplier returns and losses. Record stocktake differences as adjustments rather than overwriting previous transactions.

Each physical event should create one movement. If an order-processing routine creates a dispatch movement, staff should not also enter that dispatch manually.

Build a stock balance query

  1. Choose Create, then Query Design, and add tblProducts and tblStockMovements.
  2. Open the join properties and select the option that includes all records from tblProducts and only matching movements.
  3. Add ProductID and ProductName from tblProducts, plus ReorderLevel.
  4. Turn on Totals. Leave those three fields set to Group By.
  5. In a blank column, enter StockOnHand: Nz(Sum([QuantityChange]),0) and set its Total row to Expression.
  6. Save as qryStockOnHand and run it.

The outer join keeps products without movements visible. The Nz function replaces a missing total with zero. Opening balances must be recorded for these results to represent actual stock.

Create another query based on qryStockOnHand. Include the product fields and set the StockOnHand criterion to <=[ReorderLevel]. Save it as qryLowStock. This flags products at or below their threshold; it does not account for outstanding purchases or reserved stock.

Add forms, validation and useful reports

Use Create, then Form Wizard, to build product and supplier forms. Build a movement form bound to tblStockMovements, with a product combo box that displays the SKU and name while storing ProductID. Provide a controlled MovementType list so staff use consistent descriptions.

Set ReorderLevel, UnitCost and SellingPrice validation rules to >=0 where negative values are inappropriate. Set QuantityChange to <>0 and Required to Yes. Negative movements must remain allowed because dispatches reduce stock. Add clear Validation Text explaining rejected entries.

These field rules do not stop a dispatch from exceeding available stock. Blocking negative balances needs additional transaction logic, including handling simultaneous entries if several staff use the database.

Use Report Wizard with qryLowStock to create a replenishment list. Build a movement-history query filtered by product and date for investigating discrepancies. Sales revenue reports need actual sale prices recorded on order lines; multiplying dispatch quantities by today's product price will not reliably reproduce historical revenue.

Check the results before using live stock

  1. Add a sample supplier and product, then enter an opening count, a receipt and a dispatch.
  2. Calculate the expected balance manually and compare it with qryStockOnHand.
  3. Check that a product without movements appears with zero stock and that the low-stock report includes products at their threshold.
  4. Try a duplicate SKU, an invalid ProductID and a zero movement to confirm validation works.
  5. Make a backup and open a restored copy to confirm it is usable.

If importing Excel or CSV data through External Data, use a staging table first. Check SKUs, field types and supplier matches before transferring records into the live tables.

Restrict access to the database file and maintain regular backups. An .accdb file does not provide built-in per-user permissions; a custom login form is not an equivalent security boundary. Microsoft's guidance on Access user-level security explains alternatives, including a database server when individual permissions are required.

For related setup help, browse the Microsoft Office guides. Next, build the three tables in a test database and reconcile one product's movements against a physical count before importing the rest of your stock.

Other editions for separate workloads

Other editions for separate workloads; prices in AUD, confirm the total on the listing.

How to check this worked

  1. Open Settings, System, Activation and confirm the edition shown.
  2. Enter the key and run activation; expect a green tick within a minute.
  3. Reboot and re-check activation survives the restart.

FAQ

What else should you know before buying?

What do I need before starting?
Read the requirements and confirm the edition first; the steps assume the machine is compatible.
How do I know the licence is genuine?
Activate on Microsoft's servers and check Settings, System, Activation. A working activation is the test.
Is this a subscription?
Keys sold here are one-time lifetime licences. Microsoft 365 plans are billed by Microsoft instead.
What if the key fails?
Email hi@ms.codes with the order number and a screenshot. Replacement or refund applies within 30 days.

Check who prepared and reviewed this guide

Written by
MS.Codes editorial
Reviewed by
Support team

Last verified: (source review; see test status above).

Recent Post