K
KAitchison
Hi there, Im hoping someone can help me with a bit of a complex
calculation... i'm fairly new to access..
so what i'm trying to accomplish is this:
one text box (txtleach) accepts a value input but the user, on the 'After
Update' event i want another text box (txtvolume) to calculate..
in excel the calculation looks like
=+((((((1.219^2)*(1*(ACOS((1.219-$E15)/1.219))))-((1.219-$E15)*(SQRT((2*1.219*$E15)-($E15^2))))))*9.449)*264.17)*3.54
right now this is what i have in my code based on what i help i have found
online...
Private Sub txtleach_AfterUpdate()
Dim answer As Integer
Dim sqrt As Integer
answer = Application.worksheetfunction.Acos(((1.219 - [txtleach]) /
1.219))
sqrt = Application.worksheetfunction.sqrt(((2 * 1.219 * [txtleach]) -
([txtleach] ^ 2)))
Me.txtvolume = ((((((1.219 ^ 2) * (1 * answer))) - ((1.219 - [txtleach])
* (sqrt)))) * 9.449) * 264.17 * 3.54
End Sub
this code gives me a #Name in txtvolume and when i try to run it i get an
error that says method or data member not found but after trying lots of
different things to change it i still get the same error... can anyone help
with this??
Krista
calculation... i'm fairly new to access..
so what i'm trying to accomplish is this:
one text box (txtleach) accepts a value input but the user, on the 'After
Update' event i want another text box (txtvolume) to calculate..
in excel the calculation looks like
=+((((((1.219^2)*(1*(ACOS((1.219-$E15)/1.219))))-((1.219-$E15)*(SQRT((2*1.219*$E15)-($E15^2))))))*9.449)*264.17)*3.54
right now this is what i have in my code based on what i help i have found
online...
Private Sub txtleach_AfterUpdate()
Dim answer As Integer
Dim sqrt As Integer
answer = Application.worksheetfunction.Acos(((1.219 - [txtleach]) /
1.219))
sqrt = Application.worksheetfunction.sqrt(((2 * 1.219 * [txtleach]) -
([txtleach] ^ 2)))
Me.txtvolume = ((((((1.219 ^ 2) * (1 * answer))) - ((1.219 - [txtleach])
* (sqrt)))) * 9.449) * 264.17 * 3.54
End Sub
this code gives me a #Name in txtvolume and when i try to run it i get an
error that says method or data member not found but after trying lots of
different things to change it i still get the same error... can anyone help
with this??
Krista