J
Jeff Wilkin
Hi All,
I'm working on a small inventory .mdb to keep track of about 900 different
products any of which can be located in up to 9 different storage areas. I
do periodic stock takes which are then recorded in a m:m junction table with
a date stamp. A qry based on this table is the recordsource for my Quarterly
and EoY reports because I have to physically count everything then anyhow -
this is easy. But for an interim report, I need a totals qry that lists each
product in each storage area and which also takes into account all
deliveries and transfers since the last stock-take date. This has me
absolutely baffled. I don't even know where to begin. Does anyone have any
suggestions for an SQL idiot?
Thanks for even reading this far,
Jeff
Report structured as follows:
[StorageID] {Grouping}
[ProdID] - [Volume] - [QtyOH] - [IndPackID] - [TotVal = QtyOH *
ProdCost]
Looks like:
Refridgerator 1
Heineken 0,33l 3000 Bottle 2.313,00 ?
Löwenbräu 50L 10 Keg 738,00 ?
pertinent table and field structures as follows: all FK's are long integers
tblStorage:
StorageID (PK auto)
Storage
tblProducts:
ProdID (PK auto)
Product
Volume 'text ie 50 Liters
IndPackID (FK) ' individual packaging type ie bottle, can, keg
ProdCost 'currency - cost per individual packaging type
CategoryID (FK)
tblCategories:
CategoryID (PK)
Category ' beverage, food item, cleaning supplies
tblPackaging:
PackID (PK auto)
Packaging
tblProductStorage: ' M:M junction tbl *****
DateStamp ' date/time - short - updates via code from form after QtyLast
updated
StorageID (FK & comp.PK)
ProdID (FK & comp.PK)
QtyLast ' double
IndPackID (FK)
tblTransfers:
TransferID (PK auto)
TransDate ' date/time - short
StorageID (FK) ' location INTO which item is received
tblTransDetails:
TDetailsID (PK auto)
TransferID (FK)
StorageID (FK) ' location FROM which item is removed
ProdID (FK)
QtyOut ' double
IndPackID (FK)
tblDeliveries:
DeliveryID (PK auto)
DeliveryDate ' date/time - short
tblDeliveryDetails:
DDetails (PK auto)
DeliveryID (FK)
StorageID (FK) 'location into which item is received
ProdID (FK)
QtyIn ' double
IndPackID (FK)
I'm working on a small inventory .mdb to keep track of about 900 different
products any of which can be located in up to 9 different storage areas. I
do periodic stock takes which are then recorded in a m:m junction table with
a date stamp. A qry based on this table is the recordsource for my Quarterly
and EoY reports because I have to physically count everything then anyhow -
this is easy. But for an interim report, I need a totals qry that lists each
product in each storage area and which also takes into account all
deliveries and transfers since the last stock-take date. This has me
absolutely baffled. I don't even know where to begin. Does anyone have any
suggestions for an SQL idiot?
Thanks for even reading this far,
Jeff
Report structured as follows:
[StorageID] {Grouping}
[ProdID] - [Volume] - [QtyOH] - [IndPackID] - [TotVal = QtyOH *
ProdCost]
Looks like:
Refridgerator 1
Heineken 0,33l 3000 Bottle 2.313,00 ?
Löwenbräu 50L 10 Keg 738,00 ?
pertinent table and field structures as follows: all FK's are long integers
tblStorage:
StorageID (PK auto)
Storage
tblProducts:
ProdID (PK auto)
Product
Volume 'text ie 50 Liters
IndPackID (FK) ' individual packaging type ie bottle, can, keg
ProdCost 'currency - cost per individual packaging type
CategoryID (FK)
tblCategories:
CategoryID (PK)
Category ' beverage, food item, cleaning supplies
tblPackaging:
PackID (PK auto)
Packaging
tblProductStorage: ' M:M junction tbl *****
DateStamp ' date/time - short - updates via code from form after QtyLast
updated
StorageID (FK & comp.PK)
ProdID (FK & comp.PK)
QtyLast ' double
IndPackID (FK)
tblTransfers:
TransferID (PK auto)
TransDate ' date/time - short
StorageID (FK) ' location INTO which item is received
tblTransDetails:
TDetailsID (PK auto)
TransferID (FK)
StorageID (FK) ' location FROM which item is removed
ProdID (FK)
QtyOut ' double
IndPackID (FK)
tblDeliveries:
DeliveryID (PK auto)
DeliveryDate ' date/time - short
tblDeliveryDetails:
DDetails (PK auto)
DeliveryID (FK)
StorageID (FK) 'location into which item is received
ProdID (FK)
QtyIn ' double
IndPackID (FK)