Results 1 to 3 of 3
  1. #1
    CraigR is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    27

    how to use RADIANS


    Hi
    I'm trying to convert an excel calc into ms access vb
    excel =SIN(RADIANS(70))

    access = Me.Step2 = Sin(RADIANS(70))
    thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    will this help?
    https://www.techonthenet.com/access/functions/numeric/atn.php


  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    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 Function
    0.939692620785908

    You could round the function results to get 8 decimal places.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums