Hello all,
I almost complete my mini project - Stock Inventory:
To track goods/products enter and exit from warehouse or simply known as Stock Transaction (IN/OUT). This also include a Inventory Catalog which basically show all the products in the warehouse, each product details including category, description and most importantly quantity on hand.
As mentioned above, I almost complete the database except the most important Form - New Stock Transaction where User enter all the necessary details to issue an IN or OUT Transaction. To make things easy to understand, it share many similarity with Invoice and New Order.
So far, I had made the form worked. A subform is within the form to handle the Product and its Quantity.
- Main Form (Table: StockTrans)
- Trans_ID
-
Trans_Type
-
Trans_Date
-
Trans_Cust
-
Trans_Note
- SubForm (Table: StockTrans_Items)
- Trans_ID fk
- ItemID fk
-
Trans_Item_Qty
Take note that, the above works but it is not what I prefer.
Example to describe my current situation.
- Trans_ID ItemID Trans_Item_Qty
-
T0001 CATFOOD-1 10 TINS
When I finished T0001 record and enter 10 Tins in end of the record, it will auto update the Item Quantity on Hand.
I would prefer it to allow me to key-in all the involved Products then I click a POST button. This will confirm all the details of the transaction and make the necessary adjustment to the quantity on hand at Once, not after every one single completed record.
My idea:
- Create another table that hold the involved Products' Detail temporary until User POST the Transaction
- Right after that, use VBA 'Loop' method to update each entered records (Temp Product Detail Table). This is to update (make necessary adjustment) Item Quantity On Hand (Table: Item)
- After that with success, move all the records (Temp Table) to StockTrans_Items (Table).
- After that, delete all records (Temp Table)
If you are confuse, feel free to ask and any suggestion is welcome too.