Slap
Registered User.
- Local time
- Today, 00:00
- Joined
- May 21, 2011
- Messages
- 45
I am having a brain block on how to approach a problem I have with Inventory.
I need to be able to migrate an inventory snapshot built from 2 separate stock records which at their highest level (Item/Lot/Qty) will be the same.
My first step is to create a 'matching' inventory table based on grouped queries to find all matching records (in the knowledge not all records will match), that I have achieved and tested ok.
This is where my problem now surfaces.
Using data from Table 1 which has this information:
ITEM
LOT/SERIAL
QTY
Sub-Inventory
I need to now add the 'locator' (shelf position in the warehouse), which is a sub-set of Sub-Inventory.
Where the stock is a direct match and only 1 sub-inventory exists I have achieved this simply with queries but as soon as I have 2 values in sub-inventory and more than 1 shelf locator position then queries pull duplicate records.
I'm leaning towards VBA using DCount & recordsets to essentially build a new table of records with the data I need, does that sound correct?
Example:
My Stock
ITEM
LOT/SERIAL
QTY
SUB-INVENTORY
A1, ABC1, 10, MAIN
A1, ABC1, 10, DAMAGE
Warehouse Stock
ITEM
LOT/SERIAL
QTY
LOCATOR
A1, ABC1, 3, L10101
A1, ABC1, 7, L10102
A1, ABC1, 4, L10103
A1, ABC1, 6, L10104
Outcome expected
A1, ABC1, 3, MAIN, L10101
A1, ABC1, 7, MAIN, L10102
A1, ABC1, 4, DAMAGE, L10103
A1, ABC1, 6, DAMAGE, L10104
I need to be able to migrate an inventory snapshot built from 2 separate stock records which at their highest level (Item/Lot/Qty) will be the same.
My first step is to create a 'matching' inventory table based on grouped queries to find all matching records (in the knowledge not all records will match), that I have achieved and tested ok.
This is where my problem now surfaces.
Using data from Table 1 which has this information:
ITEM
LOT/SERIAL
QTY
Sub-Inventory
I need to now add the 'locator' (shelf position in the warehouse), which is a sub-set of Sub-Inventory.
Where the stock is a direct match and only 1 sub-inventory exists I have achieved this simply with queries but as soon as I have 2 values in sub-inventory and more than 1 shelf locator position then queries pull duplicate records.
I'm leaning towards VBA using DCount & recordsets to essentially build a new table of records with the data I need, does that sound correct?
Example:
My Stock
ITEM
LOT/SERIAL
QTY
SUB-INVENTORY
A1, ABC1, 10, MAIN
A1, ABC1, 10, DAMAGE
Warehouse Stock
ITEM
LOT/SERIAL
QTY
LOCATOR
A1, ABC1, 3, L10101
A1, ABC1, 7, L10102
A1, ABC1, 4, L10103
A1, ABC1, 6, L10104
Outcome expected
A1, ABC1, 3, MAIN, L10101
A1, ABC1, 7, MAIN, L10102
A1, ABC1, 4, DAMAGE, L10103
A1, ABC1, 6, DAMAGE, L10104
Last edited: