K
Kate
Hello,
I have a main form which summarises product information.
I then have a subform which contains the operations required to
manufacture that part.
For example, op1 might be 2 hours of using the NC lathe, op2 might be 1
hour machining using the NC lathe, op3 might be rumbling for half an
hour etc.
I want to summarise this information on the main form, such that the
above example would look as follows:
NC Lathe 3 hours (=2 +1 because the first 2 ops are both done on teh
same machine)
Rumbling 0.5 hours
I had decided to put a whole pile of invisible textboxes on teh main
form called machine(1), machine(2) etc, and make them visible when
filled.
i = Operation_Summary!Operation_Number
If i = 1 Then
Machine(1) = Operation_Summary!Operation
Time(1) = Operation_Summary!Programme_Time +
Operation_Summary!SetUp_Time + (Operation_Summary!Cycle_Time) * (Qty +
Scrap_Other_Qty)
ElseIf Machine(i - 1) = Operation_Summary!Operation Then
Time(i - 1) = Time(i - 1) + Operation_Summary!Programme_Time +
Operation_Summary!SetUp_Time + (Operation_Summary!Cycle_Time) * (Qty +
Scrap_Other_Qty)
Else
Machine(i) = Operation_Summary!Operation
Time(i) = Operation_Summary!SetUp_Time +
(Operation_Summary!Cycle_Time) * (Qty + Scrap_Other_Qty)
End If
But I can't get this to work. What am I doing wrong?
I have a main form which summarises product information.
I then have a subform which contains the operations required to
manufacture that part.
For example, op1 might be 2 hours of using the NC lathe, op2 might be 1
hour machining using the NC lathe, op3 might be rumbling for half an
hour etc.
I want to summarise this information on the main form, such that the
above example would look as follows:
NC Lathe 3 hours (=2 +1 because the first 2 ops are both done on teh
same machine)
Rumbling 0.5 hours
I had decided to put a whole pile of invisible textboxes on teh main
form called machine(1), machine(2) etc, and make them visible when
filled.
i = Operation_Summary!Operation_Number
If i = 1 Then
Machine(1) = Operation_Summary!Operation
Time(1) = Operation_Summary!Programme_Time +
Operation_Summary!SetUp_Time + (Operation_Summary!Cycle_Time) * (Qty +
Scrap_Other_Qty)
ElseIf Machine(i - 1) = Operation_Summary!Operation Then
Time(i - 1) = Time(i - 1) + Operation_Summary!Programme_Time +
Operation_Summary!SetUp_Time + (Operation_Summary!Cycle_Time) * (Qty +
Scrap_Other_Qty)
Else
Machine(i) = Operation_Summary!Operation
Time(i) = Operation_Summary!SetUp_Time +
(Operation_Summary!Cycle_Time) * (Qty + Scrap_Other_Qty)
End If
But I can't get this to work. What am I doing wrong?
. Since several operations can have the same JobID, the JobID