Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2004
    Posts
    48

    Unanswered: Number Display in Access database field

    Hello,


    I'm trying to display a number in a field to only display the number(s) to the left of the decimal point. The numbers are a result of a calculation so there could be 1 or 2 digits to the left of the decimal.For example, 10.567 should display as 10; 5.987 should show 5.

    Same goes for the numbers to the right of the decimal.

    Any suggestions? Thanks, in advance.

  2. #2
    Join Date
    Aug 2006
    Posts
    559
    Doesn't selecting "decimal places" in the corresponding table and placing a "0" in it do it?

    That's what I did in my db and it doesn't show decimals.

  3. #3
    Join Date
    Aug 2004
    Posts
    48

    Number Display in Access field

    Hi Graffixx01,

    This field is on a form for display purposes only. There's no corresponding item in the table so no data is saved nor does it need to be.

    However, if your method works, perhaps the data should be stored in a table.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    do you want to ROUND()/FIX() the number or just the display?
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Aug 2004
    Posts
    48

    Number display in Access form

    Just the display, thanks.

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    =Int(<Value/Calculation>) will give you the integer portion of a number or calculation
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Aug 2004
    Posts
    48

    Number display in Access field

    Thank you Startrekker. INT works great.

    Now I just need to know how to grab the decimal point and the numbers to the right of it.

    I could do it if I was using a query but I'm not.

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    =<Value> - Int(<Value>) will give you the decimal portion of a number
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Aug 2004
    Posts
    48

    Number display in Access field

    Of course and duh!
    Thanks again Startrekker!

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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