OK What am I doing wrong here!
It keeps throwing a sub end/exit error
INSITUDENS1
'
'------------------------------------------------------------
Function INSITUDENS1()
On Error GoTo INSITUDENS1_Err
Forms![Density Test]![Result 1] = Forms![Density Test]!DENS1
Forms![Density Test]![Voids 1] = Forms![Density Test]!V1
Forms![Density Test]![Density Ratio 1] = Forms![Density Test]!DR1
Forms![Density Test]![Result 2] = Forms![Density Test]!DENS2
Forms![Density Test]![Voids 2] = Forms![Density Test]!V2
Forms![Density Test]![Density Ratio 2] = Forms![Density Test]!DR2
Forms![Density Test]![Result 3] = Forms![Density Test]!DENS3
Forms![Density Test]![Voids 3] = Forms![Density Test]!V3
Forms![Density Test]![Density Ratio 3] = Forms![Density Test]!DR3
Forms![Density Test]![Result 4] = Forms![Density Test]!DENS4
Forms![Density Test]![Voids 4] = Forms![Density Test]!V4
Forms![Density Test]![Density Ratio 4] = Forms![Density Test]!DR4
Forms![Density Test]![Result 5] = Forms![Density Test]!DENS5
Forms![Density Test]![Voids 5] = Forms![Density Test]!V5
Forms![Density Test]![Density Ratio 5] = Forms![Density Test]!DR5
Forms![Density Test]![Result 6] = Forms![Density Test]!DENS6
Forms![Density Test]![Voids 6] = Forms![Density Test]!V6
Forms![Density Test]![Density Ratio 6] = Forms![Density Test]!DR6
Forms![Density Test]![Result 7] = Forms![Density Test]!DENS7
Forms![Density Test]![Voids 7] = Forms![Density Test]!V7
Forms![Density Test]![Result 8] = Forms![Density Test]!DENS8
Forms![Density Test]![Voids 8] = Forms![Density Test]!V8
Forms![Density Test]![Result 9] = Forms![Density Test]!DENS9
Forms![Density Test]![Voids 9] = Forms![Density Test]!V9
Forms![Density Test]![Result 10] = Forms![Density Test]!DENS10
Forms![Density Test]![Voids 10] = Forms![Density Test]!V10
Private Sub AverageDens_AfterUpdate()
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] = S1 / x
Forms![Density Test]![Av Density] = Forms![Density Test]![AvD]
End Sub
INSITUDENS1_Exit:
Exit Sub
INSITUDENS1_Err:
MsgBox Error$
Resume INSITUDENS1_Exit
End Sub
It keeps throwing a sub end/exit error
INSITUDENS1
'
'------------------------------------------------------------
Function INSITUDENS1()
On Error GoTo INSITUDENS1_Err
Forms![Density Test]![Result 1] = Forms![Density Test]!DENS1
Forms![Density Test]![Voids 1] = Forms![Density Test]!V1
Forms![Density Test]![Density Ratio 1] = Forms![Density Test]!DR1
Forms![Density Test]![Result 2] = Forms![Density Test]!DENS2
Forms![Density Test]![Voids 2] = Forms![Density Test]!V2
Forms![Density Test]![Density Ratio 2] = Forms![Density Test]!DR2
Forms![Density Test]![Result 3] = Forms![Density Test]!DENS3
Forms![Density Test]![Voids 3] = Forms![Density Test]!V3
Forms![Density Test]![Density Ratio 3] = Forms![Density Test]!DR3
Forms![Density Test]![Result 4] = Forms![Density Test]!DENS4
Forms![Density Test]![Voids 4] = Forms![Density Test]!V4
Forms![Density Test]![Density Ratio 4] = Forms![Density Test]!DR4
Forms![Density Test]![Result 5] = Forms![Density Test]!DENS5
Forms![Density Test]![Voids 5] = Forms![Density Test]!V5
Forms![Density Test]![Density Ratio 5] = Forms![Density Test]!DR5
Forms![Density Test]![Result 6] = Forms![Density Test]!DENS6
Forms![Density Test]![Voids 6] = Forms![Density Test]!V6
Forms![Density Test]![Density Ratio 6] = Forms![Density Test]!DR6
Forms![Density Test]![Result 7] = Forms![Density Test]!DENS7
Forms![Density Test]![Voids 7] = Forms![Density Test]!V7
Forms![Density Test]![Result 8] = Forms![Density Test]!DENS8
Forms![Density Test]![Voids 8] = Forms![Density Test]!V8
Forms![Density Test]![Result 9] = Forms![Density Test]!DENS9
Forms![Density Test]![Voids 9] = Forms![Density Test]!V9
Forms![Density Test]![Result 10] = Forms![Density Test]!DENS10
Forms![Density Test]![Voids 10] = Forms![Density Test]!V10
Private Sub AverageDens_AfterUpdate()
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] = S1 / x
Forms![Density Test]![Av Density] = Forms![Density Test]![AvD]
End Sub
INSITUDENS1_Exit:
Exit Sub
INSITUDENS1_Err:
MsgBox Error$
Resume INSITUDENS1_Exit
End Sub