Hello,
I have an inventory tracking problem that is tailor made to be solved by a database. I just need a little help getting it together. A sample database with a table is attached to help illustrate the situation.
Basically, inventory is purchased in large blocks and sold later in smaller blocks. I need to track the cost on a First in First Out (FIFO) methodology.
For example:
Jan 1 - 1,000 units of product XYZ are purchased at $10.
Jan 15 - 500 units of product XYZ are purchased at $8.
Jan 20 - 800 units of product XYZ are sold at $15.
Jan 25 - 400 units of product XYZ are sold at $9.
My solution is to have Access create a LotNumberID for the purchases and then allocate the sells to these lots.
The lots needed in this example would be:
Jan 1 Purchase = Create Lot 1
Jan 15 Purchase = Create Lot 2
Jan 20 Sale = Allocate 800 units to Lot 1.
Jan 25 Sale = Allocate 200 units to Lot 1 and Allocate 200 units to Lot 2.
My problem is that I do not know how to get Access to handle these LotNumberID's properly. With Jon K's help I have mastered running sums in Access but this calls for something different. You can not use the Select(*) Count function because then it will give you Lot 1, Lot 2, Lot 3, Lot 4.
I think databases were built to solve problems like this so I know it is doable. I just need help with the syntax.
Thanks in advance - I am always suprised at the quality of the responses the users of this forum provide.
Dwight.
I have an inventory tracking problem that is tailor made to be solved by a database. I just need a little help getting it together. A sample database with a table is attached to help illustrate the situation.
Basically, inventory is purchased in large blocks and sold later in smaller blocks. I need to track the cost on a First in First Out (FIFO) methodology.
For example:
Jan 1 - 1,000 units of product XYZ are purchased at $10.
Jan 15 - 500 units of product XYZ are purchased at $8.
Jan 20 - 800 units of product XYZ are sold at $15.
Jan 25 - 400 units of product XYZ are sold at $9.
My solution is to have Access create a LotNumberID for the purchases and then allocate the sells to these lots.
The lots needed in this example would be:
Jan 1 Purchase = Create Lot 1
Jan 15 Purchase = Create Lot 2
Jan 20 Sale = Allocate 800 units to Lot 1.
Jan 25 Sale = Allocate 200 units to Lot 1 and Allocate 200 units to Lot 2.
My problem is that I do not know how to get Access to handle these LotNumberID's properly. With Jon K's help I have mastered running sums in Access but this calls for something different. You can not use the Select(*) Count function because then it will give you Lot 1, Lot 2, Lot 3, Lot 4.
I think databases were built to solve problems like this so I know it is doable. I just need help with the syntax.
Thanks in advance - I am always suprised at the quality of the responses the users of this forum provide.
Dwight.