Hi,
I am new to Access VBA and trying to achive the following:
I have a table in which there are following fields and values:
ProfileWeight Length NoOfJoints Runout WeightOfBillet 0.184 6.10 25 152.5 Error 2.180 5.50 25 135.5 Error 3.560 6.50 25 162.5 Error
"NoOfJoints" is by default 25 and formula to calculate the Runout is: Lenght*NoOfJoints
The formula to calculate "WeightOfBillet" is: IIf(Runout>=50,"Error",ProfileWeight*RunOut)
Now, the formula would give error as the "Runout" is very high. So, is it possible to reduce "NoOfJoints" by 1 and iterate till the "Runout" is <50
e.g. if the Number of joints is 8 for the first record then we would get the Runout as 48.8. At this stage the "WeightOfBillet" formula should be true and give the result as: 0.184*48.8=8.972
I am a newbie to Access VBA and will highly appreciate if you can advise me to create a VBA function for the above.
Regards,
Ash