x = Forms![Density Test]![No of Test]
For n = 1 To x
Dat = Choose(n, Forms![Density Test]!DENS1, Forms![Density Test]!DENS2, Forms![Density Test]!DENS3, Forms![Density Test]!DENS4, Forms![Density Test]!DENS5, Forms![Density Test]!DENS5, Forms![Density Test]!DENS6, Forms![Density Test]!DENS7, Forms![Density Test]!DENS8, Forms![Density Test]!DENS9, Forms![Density Test]!DENS10)
S1 = S1 + Dat
Next
Forms![Density Test]![AvD] = n
Forms![Density Test]![Av Density] = Forms![Density Test]![AvD]
I get 7 out of n! Why?
Also doing testing of the routine with x=6, and the 6 DENS equaling 2.333, 2.287, 2.365, 2.264, 2.377 and 2.339 respectively I get S1 = 14.002 instead of 13.965.
When I do Forms![Density Test]![AvD] = x, i get 6 ( in place of Forms![Density Test]![AvD] = n)
When I do Forms![Density Test]![AvD] = S1/x, I get 2.334 instead of the correct answer 2.327.
This is driving me crazy!
Please help?
Regards
Reece
For n = 1 To x
Dat = Choose(n, Forms![Density Test]!DENS1, Forms![Density Test]!DENS2, Forms![Density Test]!DENS3, Forms![Density Test]!DENS4, Forms![Density Test]!DENS5, Forms![Density Test]!DENS5, Forms![Density Test]!DENS6, Forms![Density Test]!DENS7, Forms![Density Test]!DENS8, Forms![Density Test]!DENS9, Forms![Density Test]!DENS10)
S1 = S1 + Dat
Next
Forms![Density Test]![AvD] = n
Forms![Density Test]![Av Density] = Forms![Density Test]![AvD]
I get 7 out of n! Why?
Also doing testing of the routine with x=6, and the 6 DENS equaling 2.333, 2.287, 2.365, 2.264, 2.377 and 2.339 respectively I get S1 = 14.002 instead of 13.965.
When I do Forms![Density Test]![AvD] = x, i get 6 ( in place of Forms![Density Test]![AvD] = n)
When I do Forms![Density Test]![AvD] = S1/x, I get 2.334 instead of the correct answer 2.327.
This is driving me crazy!
Please help?
Regards
Reece