Hi
I'm trying to convert an excel calc into ms access vb
excel =SIN(RADIANS(70))
access = Me.Step2 = Sin(RADIANS(70))
thanks
Hi
I'm trying to convert an excel calc into ms access vb
excel =SIN(RADIANS(70))
access = Me.Step2 = Sin(RADIANS(70))
thanks
will this help?
https://www.techonthenet.com/access/functions/numeric/atn.php
You didn't say WHAT (it is not degrees and not radians) you are calculating or give any examples/expected results, so try this function.
excel -->> =SIN(RADIANS(70))
Access -->> CalcValue(70) '<<--Function I created
App
Calc Results Excel =SIN(RADIANS(70)) 0.939692621 Access Public Function CalcValue(pDeg As Integer) As Double
Dim PI As Double
Dim tmp As Double
'calc Pi
PI = 4 * Atn(1)
'convert deg to radians
tmp = pDeg * PI / 180
' Debug.Print tmp
CalcValue = Sin(tmp)
End Function0.939692620785908
You could round the function results to get 8 decimal places.