Results 1 to 6 of 6
  1. #1
    BobW2961 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    16

    format currency to 5 decimals

    Hello,
    I have a currency field that is set to 5 decimals in the table.
    When a value is entered into the field, it is rounded. Is there a way to top this?
    for example.
    If I enter 1.00007 the field changes the value to 1.00010
    I would like the field to stay at 1.00007.



    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The currency data type only goes to 4 digits. Try single or double instead, but be aware that they're floating point.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    BobW2961 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    16
    i'm not sure I understand the consequenses of changing to a floating point. I assume I would just have to add the "$"s myself in the reports.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I've seen instances where (to simplify) 2 + 2 does not equal 4. The computer might be storing 3.9999999999999 or something like that. I forgot about Decimal, so maybe try that first.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    I assume I would just have to add the "$"s myself in the reports.
    use the format property to do this

  6. #6
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    I suggest using Decimal and specify scale and precision properties in the table.
    Precision is the total number of digits allowed in a number, including left and right of the decimal.
    Scale is the number of digits allowed to the right of the decimal.


    So 1234567.89 has a precision of 9.
    123456.789 has a precision of 9 and a scale of 3.


    A precision of 4 and scale of 2 would result in a number with a maximum value of 99.99


    Percent designations like 125.5% would require precision 4 and scale of 3 (not one) since it is actually stored as 1.255.


    Precision has a maximum value of 28, but textboxes in forms allow only a max of about 15 decimal places.

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

Similar Threads

  1. Decimals, formatting maybe currency.
    By Perfac in forum Programming
    Replies: 3
    Last Post: 01-27-2018, 09:24 AM
  2. Format field to show 2 decimals
    By takara in forum Forms
    Replies: 13
    Last Post: 06-04-2015, 03:18 PM
  3. Listbox currency format
    By princess12 in forum Access
    Replies: 9
    Last Post: 04-14-2015, 03:49 PM
  4. Custom Currency Format
    By Ichigo in forum Access
    Replies: 3
    Last Post: 04-26-2011, 03:34 AM
  5. Replies: 2
    Last Post: 03-23-2011, 11:43 AM

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