A
A Hopper
I have three tables that represent the various parts of
the process and data is entered by different employees
into these tables.
ProductionTable
Skid Number Quantity Produced
1 100
2 200
3 150
4 300
5 235
6 400
CuttingTable
Skid Number Quantity Produced
1 95
3 145
4 195
5 234
PackagingTable
Skid Number Quantity Produced
1 90
3 140
5 233
The information from all tables, if put together, would be.
SkidNumber QuantityProduced QuantityCut QuantityPackaged
1 100 95 91
2 200
3 150 145 142
4 300 195
5 235 234 233
6 400
On the form I want to show CutSpoils and PackSpoils
for "SkidNumber"(s) that have completed the entire
process. (In the above example skids 1,3 & 5 which are
completed through packaging).
The question marks below inidcate critieria I don't know
how to write.
Dim QtyProduced As Single
Dim QtyCut As Single
Dim QtyPacked As Single
Dim QuantityCutSpoils As Single
Dim QuantityPackSpoils As Single
QtyProduced = (Nz(DSum("(Nz
[QuantityProduced]))", "ProductionTable", "[SkidNumber]="
& ????)))
Answer needed: SkidNumber 1 = 100
SkidNumber 3 = 150
SkidNumber 5 = 235
Sum = 485
QtyCut = (Nz(DSum("(Nz
[QuantityCut]))", "CuttingTable", "[SkidNumber]=" & ????)))
Answer needed: SkidNumber 1 = 95
SkidNumber 3 = 145
SkidNumber 5 = 234
Sum = 474
QtyPacked = (Nz(DSum("(Nz
[QuantityPackaged]))", "PackagingTable", "[SkidNumber]="
& ????)))
Answer needed: SkidNumber 1 = 91
SkidNumber 3 = 142
SkidNumber 5 = 233
Sum = 466
QuantityCutSpoils = QtyProduced - QtyCut Answer 485 - 474
QuantityPackSpoils = QtyCut - QtyPacked Answer 474 - 466
I will display the answer in textboxes on the form.
Me.CutSpoils = Nz(QuantityCutSpoils) Answer = 11
Me.PackSpoils = Nz(QuantityPackSpoils) Answer = 8
Thanks for your help.
Allan
the process and data is entered by different employees
into these tables.
ProductionTable
Skid Number Quantity Produced
1 100
2 200
3 150
4 300
5 235
6 400
CuttingTable
Skid Number Quantity Produced
1 95
3 145
4 195
5 234
PackagingTable
Skid Number Quantity Produced
1 90
3 140
5 233
The information from all tables, if put together, would be.
SkidNumber QuantityProduced QuantityCut QuantityPackaged
1 100 95 91
2 200
3 150 145 142
4 300 195
5 235 234 233
6 400
On the form I want to show CutSpoils and PackSpoils
for "SkidNumber"(s) that have completed the entire
process. (In the above example skids 1,3 & 5 which are
completed through packaging).
The question marks below inidcate critieria I don't know
how to write.
Dim QtyProduced As Single
Dim QtyCut As Single
Dim QtyPacked As Single
Dim QuantityCutSpoils As Single
Dim QuantityPackSpoils As Single
QtyProduced = (Nz(DSum("(Nz
[QuantityProduced]))", "ProductionTable", "[SkidNumber]="
& ????)))
Answer needed: SkidNumber 1 = 100
SkidNumber 3 = 150
SkidNumber 5 = 235
Sum = 485
QtyCut = (Nz(DSum("(Nz
[QuantityCut]))", "CuttingTable", "[SkidNumber]=" & ????)))
Answer needed: SkidNumber 1 = 95
SkidNumber 3 = 145
SkidNumber 5 = 234
Sum = 474
QtyPacked = (Nz(DSum("(Nz
[QuantityPackaged]))", "PackagingTable", "[SkidNumber]="
& ????)))
Answer needed: SkidNumber 1 = 91
SkidNumber 3 = 142
SkidNumber 5 = 233
Sum = 466
QuantityCutSpoils = QtyProduced - QtyCut Answer 485 - 474
QuantityPackSpoils = QtyCut - QtyPacked Answer 474 - 466
I will display the answer in textboxes on the form.
Me.CutSpoils = Nz(QuantityCutSpoils) Answer = 11
Me.PackSpoils = Nz(QuantityPackSpoils) Answer = 8
Thanks for your help.
Allan