Ok John im going to start from the begining. Everything on this form has the
control with a formula. I am not saving any data what so ever on this form.
Ok, I have a row of text box's named txtCoilWeight1, txtCoilWeight2,
txtCoilWeight3, txtCoilWeight4, txtCoilWeight5 and lets say I put the number
700 in txtCoilWeight1. Now I have a text box named txtTotalMasterWeight which
gives me the total weight of all the boxes mentioned above. That formula in
its control source is
=NZ([txtCoilWeight1])+NZ([txtCoilWeight2])+NZ([txtCoilWeight3])+NZ([txtCoilWeight4])+NZ([txtCoilWeight5])
and it gives the total of 700 since I only entered one number in one of the
text boxes.
Next, I have a row of combo box's named cboSlitWidth1, cboSlitWidth2,
cboSlitWidth3, cboSlitWidth4, cboSlitWidth5 with no formul for thier control
source. Lets say I entered .75 in cboSlitWidth1.
Next, I have a row of test boxes named txtNumberOfCuts1, txtNumberOfCuts2,
txtNumberOfCuts3, txtNumberOfCuts4, txtNumberOfCuts5 and lets say I put the
number 8 in txtNumberOfCuts1. Now I have a text box named txtTotalCuts which
gives me the total number of cuts of all the boxes mentioned above. That
formula in its control source is
=NZ([txtNumberOfCuts1])+NZ([txtNumberOfCuts2])+NZ([txtNumberOfCuts3])+NZ([txtNumberOfCuts4])+NZ([txtNumberOfCuts5])
and it gives the total sum of 8 since I only entered one number in one of the
text boxes.
Next I have a row of text boxes named txtTotalWidthPerSize1,
txtTotalWidthPerSize2, txtTotalWidthPerSize3, txtTotalWidthPerSize4,
txtTotalWidthPerSize5 and each ones control source has the formula
=[cboSlitWidth1]*[txtNumberOfCuts1] which in txtTotalWidthPerSize1 it would
have given automaticly given me the number 6. Now at the bottom of that row I
have a text box named txtTotalWidthPerSetUp which gives me a sum of the
mentioned boxes above and in its contol source I have the formula
=NZ([txtTotalWidthPerSize1])+NZ([txtTotalWidthPerSize2])+NZ([txtTotalWidthPerSize3])+NZ([txtTotalWidthPerSize4])+NZ([txtTotalWidthPerSize5])
and it gives the total sum of 6.
Next I have a text box named txtMasterCoilWidth where you enter a number
lets say 36.8 and it has no formula in its control source.
Next I have a combo box named cboGauge where you choose a steel guage. Lets
say I chose .010.
Next I have a text box named txtPIW and in its control source I have the
formula
=IIf(nz([txtMasterCoilWidth])=0,0,[txtTotalMasterWeight]/[txtMasterCoilWidth]) it would have automaticly given me the number 19.02.
Next I have a row of text boxes named txtTotalWeightPerSize1,
txtTotalWeightPerSize2, txtTotalWeightPerSize3, txtTotalWeightPerSize4,
txtTotalWeightPerSize5 and in each ones control source it has the formula
=[txtTotalWidthPerSize1]*[txtPIW] which in txtTotalWeightPerSize1 it would
have given automaticly given me the number 114.13. Now at the bottom of that
row I have a text box named txtTotalWeightPerSetUp which gives me a sum of
the mentioned boxes above and in its contol source I have the formula
=NZ([txtTotalWeightPerSize1])+NZ([txtTotalWeightPerSize2])+NZ([txtTotalWeightPerSize3])+NZ([txtTotalWeightPerSize4])+NZ([txtTotalWeightPerSize5]).
and it gives the total sum of 114.13.
Last but not least I have a text box named txtScrapPercent and in its contol
sourc I have the formula =IIf(([txtMasterCoilWidth]=0) Or
([txtTotalWidthPerSetUp]=0),0,([txtTotalWidthPerSetUp]/[txtMasterCoilWidth])-1)
and it automaticly gives me a toal of 83.70 and this percent is correct bot
it gives a negative in front of the number and its not negative. I will
however run into negatives and that will tell me that I nead to change my
amount of cuts I can get out of a master coil ect. so here is what I have.
1) txtCoilWeight1 = 700
2) txtMasterCoilWidth = 36.8
3) cboSlitWidth1 = .75
4) txtNumberOfCuts1 = 8
total sould end up as 83.70 which it does but with a negative.
Thanks,
Chad