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.



Since 2000 we have developed nearly 500 databases for clients throughout the world. See a sample of them at our recent clients page.

We also offer Microsoft SQL Server / Azure / Cloud database development through our programmer partnership with Jay McCormick and his team.


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:

Real Estate Marketing Campaign System
 










A Blue Claw Database Design Article:

Learn How To Select A Consultant
 









Blue Claw Database Design Downloadable Tutorial:
Row Level Data Security  









Here is a randomly selected programming tutorial:

Group By Query
 


Microsoft Office:
MS Access 2003
Access 2007
Access 2010
Access 2013
Access 2016
Updated On 9/17/2017 8:20:20 AM

Contact Information

Copyright 2000-2017 Blue Claw Database Design

MS Access 2013, Access 2010 & Microsoft Office 2007