Home  Fees/Services  Access 2010 Template  Access Tutorial  Access Download  Articles  Search  Contact  Privacy  Links

Inventory Calculations in Visual Basic






Open Email Using SendObject Access Download

User Inactivity Logout VBA Code

Disable Shift Key Demo

Send Email Microsoft Access Tutorial Download (Advanced)

Sequential Counter in Query

Multi Select List Box Query Parameters

Row Level Data Security

Programming MS Access Security Alternative

Single User Inventory Calculations Download

How To Perform Multi-User Inventory Calculations

Make Dependent Combo Box Code MS Access Tutorial

Union Query Example (Simple)

Union Query (Advanced) Access Tutorial

How To Fill Fields From Combo Box

Use Global Variables as Parameters

Continuous Form Dependent Combo Box

How To Program Continuous-Continuous Master/Detail Forms

Access Bar Chart / Bar Graph

Programming Crosstab Query Example

TransferText & OutputTo Microsoft Access

DoCmd.OpenForm & OpenArgs VBA Example

Running Sum Query Method

Choose Command Dynamic SQL Order By

Access Conditional Format

Access Report Banding

Popup Form Control Method


Increment/Decrement Inventory Values

Inventory Database Calculations Example

Custom Inventory software is the most widely requested type database for our programmers. In this Access database example download we demonstrate the simplest method for calculating inventory totals when creating purchase order or similar Access forms.



Microsoft Access is a fully capable database and it's primary limitations is the number of concurrent users it will support. Generally, we recommend a limit of 10 to 15 users.

Did you know you don't need to move to SQL/Server to run and manage your Access database on the net. There are many alternative solutions. Among them are Amazon's AWS cloud services and various hosting services in nearly every state.


This Access database download shows how you can use the Docmd.Runsql statement in the after update (afterupdate) event to increment and decrement inventory totals. The methods demonstrated here are only suitable for single-user database systems since the code does not take into account the possibility of locked table records.

The following code is run from the Access database example:

Option Compare Database
Public hold_qty As Long

Private Sub Qty_Out_AfterUpdate()
DoCmd.RunSQL "Update M_Inventory set inv_qty=inv_qty+" & Nz(hold_qty, 0) & " where barcode=" & Me.BarCode
DoCmd.RunSQL "Update M_Inventory set inv_qty=inv_qty-" & Nz(Me.Qty_Out, 0) & " where barcode=" & Me.BarCode
Me.QOH.Requery
End Sub

Private Sub Qty_Out_Enter()
hold_qty = Me.Qty_Out
End Sub

The inventory calculations method shown in this example should only be considered for a one-user inventory system.  Consider using transaction processing for these types of calculations in a multi-user database so that record locking and update failures can be tracked to increase database integrity and inventory calculation accuracy.  Download the Access 2000 Inventory Calculations Example.

Inventory Calculations Access Download

Our Access transaction processing  example demonstrates performing multiple database update actions and assuring that either all or non of the updates get completed.  Here's a like to our transaction processing example.











A Blue Claw Software Design Template:

HOA Software Template
 










A Blue Claw Database Design Article:

Microsoft Access On The Internet
 









Blue Claw Database Design Downloadable Tutorial:
Make Dependent Combo Box Code MS Access  Tutorial Download  









Here is a randomly selected programming tutorial:

Predicate Query
 


Microsoft Office:
MS Access 2003
Access 2007
Access 2010
Access 2013
Access 2016
Updated On 3/15/2017 1:54:40 PM

Contact Information

Copyright 2000-2017 Blue Claw Database Design

MS Access 2013, Access 2010 & Microsoft Office 2007