Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Instr function (Access2000 or 97)

    I need to count number of digits after the decimal point. How can I do it for each record?
    Thanks <img src=/S/catty.gif border=0 alt=catty width=19 height=18>

  2. #2
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Instr function (Access2000 or 97)

    Create this function in a module:
    <font face="Georgia">
    Public Function intDecimalPlaces(strNumber As Variant) As Integer
    Dim intDP As Integer
    intDP = InStr(1, strNumber, ".")
    intDecimalPlaces = IIf(inDP > 0, Len(strNumber) - inDP, 0)
    End Function
    </font face=georgia>
    Then you can call this function from your query, form, report, etc.

    Hope this helps.

  3. #3
    New Lounger
    Join Date
    May 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Instr function (Access2000 or 97)

    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •