Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Posts
    33

    Unanswered: Rounding problem..?

    Okay, got another report; in it are 3 text boxes. 2 of them are from a query that gets data from a table, and one's a calculated textbox:

    [one of those fields] - [the other one]


    Now the first two seem to pull the data correctly, and the third one seems to calculate correctly, so all that's good.

    Problem comes in with how they display the numbers. There's some rounding or something going on somewhere, and I cannot figure out how to fix it. Like here's a snapshot of an example:

    Problem with TextBoxes

    The first record is ok, as you can see, since there's no rounding. But the second one--not so good. I tried messing with the properties with all of the boxes, some of the boxes: I tried changing the "Format" property to "General Number", I tried changing the decimal places to "3" instead of "Auto", and I've tried toggling through all those with different combinations, and different textboxes being changed and some left alone etc. etc., and nothing seems to be working. Any ideas?

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    What are the exact values that the query gives? And do the values in the tables agree with them? If so, try doing the calculation in the underlying query.

    I would have guessed things like Decimal Places and Format properties too. If you set them ALL to General Number and 3, what are the results for those bottom figures?
    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

  3. #3
    Join Date
    Jun 2008
    Posts
    33
    Ok, changing the "Format" property to "Fixed", and changing the "Decimal Places" property to "2" has worked well and solved the rounding problem.

    Example

    Now only thing is, whenever there is no data in a number spot, there are 0's that show up as placeholders. I will talk to my supervisor to see if this is a problem.

    • If not, I am done with this.
    • If so, is there anything else you'd recommend to stop it from showing the placeholders?

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Nothing wrong with zeros

    You can use the Format property to control zero displays.
    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

  5. #5
    Join Date
    Jun 2008
    Posts
    33
    Ha, yeah I ain't trippin on zeros myself--just wanted to make sure the eyes that'll be reading these reports are satisfied with them.

    And just fyi--I found out that the "Auto" for decimal places is the best..it was simply the fact that the text box was not big enough to display all of the numbers sometimes, so it rounded those figures -_- . Leave it to me to make such an easy solution seem so horridly confusing.

    Thanks for the help.

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Hahaha! Text box was too narrow LOL

    Gonna hafta remember that one for next time someone has a similar problem! I wonder how long we would have mucked around with everything else but that in a hopeless attempt at trying to solve the problem?!

    Classic!
    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
  •