Reputation: 5
I am trying to create the inventory from a point of time in the past (31 December 2021). I’m using MS Access 365. I have three tables in which I have to add and to subtract inventory for each product (what I have now plus what I have sold minus what I have bought). Table:Have + Table:Sold - Table:Bought = inventory in the end of 2021
However… the unit counts for each product are relatively different… i.e. one piece of cement bag is 50 kg and when I sell or count it, it is per piece but when I insert them the supplier always say in tons which is 20 bags per ton…
So far I have created additional table which includes as follow:
Table:unit count
ID pluralcount multiplier singularcount remarks
1 ton(x20). 20. Piece. One ton has 20 pieces of 50kg
2 pack(x6). 6. Piece. One pack has 6 pieces of item
.
.
.
As you can see… One product I might sell in piece and buy in pack etc.
Before I pull all tables of products I have or sold or bought I need to convert their unit count into something comparable…
The real issue is that how am I supposed to use query to get the multiplier value from my Table:unit count?
For example,
I pull data from table:sold and product and customer
ProductID productname customerid customername qty unitsold (multiplier)
1 cementbag c1 SomsakNumthai 1 Ton(x20) 20<<<<<this is what I want
As you can see above… I would like to pull 20 from my table:unit count that “match” with “Ton(x20)” in that query that comes from what I sold…
I want to pull because I need to convert all into singular count unit so that I can aggregate each table and then finally adding and subtracting… please help! Thank you so much in advance!
Upvotes: 0
Views: 35