Results 1 to 3 of 3
  1. #1
    aselm01 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    So Cal
    Posts
    29

    Form list box rounds up to two decimal places when I need three

    I have a check sheet that contains values for several different items. I have created a form, based on the check sheet, that allows me to review or to enter data into a table for these values. I have a query that I use to return the average of the entered values for each item based on all of the entries for an item. I have placed a list box on the form next to each item that displays that average value. I have also placed a refresh button on the form to update the averages whenever I enter a new record. The problem I have is that the list boxes round the numbers to two decimal places when I need all three.

    I have searched for a solution to this and all of them seem to be to use the format() feature in the row source field for the list box, but that won't work for me because there is already something there like this "SELECT Qry_SLD_Avg.[Avg_Of_Step_102_Positive_Side_C1] FROM Qry_SLD_Avg;". I have also made sure to use single, fixed, and 3 decimal places in the table and the query. The data in the query displays 3 decimal places so it has to be with the list boxes.



    So how do I get the list box to display all three decimal places instead of rounding up to two?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Change the listbox RowSource. Try:

    SELECT Format([Avg_Of_Step_102_Positive_Side_C1],"0.000" As A FROM Qry_SLD_Avg;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    aselm01 is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2012
    Location
    So Cal
    Posts
    29
    June7,

    Thanks for the quick reply. Tried it by copying and pasting and got a syntax error, but then fixed it and it worked thanks!

    Then I realized that I was going about it wrong and went with a sub-form based on the query and then used a query to provide data for a report too. Now everything I was trying to do works.

    I was just trying to stay away from using sub-forms. Now I just have to figure out how to do a histogram based on the data I will use the form to enter... I don't think Access will let me do that. Oh well that is a question for a different area and post.

    Thanks again for your help!

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

Similar Threads

  1. Formatting for 3 decimal places
    By Triland in forum Forms
    Replies: 12
    Last Post: 01-24-2013, 10:49 AM
  2. Decimal Places
    By momodoujimnjie in forum Access
    Replies: 1
    Last Post: 01-09-2013, 04:49 AM
  3. Report decimal places
    By jackyoung2012 in forum Reports
    Replies: 1
    Last Post: 03-22-2012, 12:12 PM
  4. Limiting decimal places
    By Cran29 in forum Access
    Replies: 13
    Last Post: 01-08-2011, 08:01 AM
  5. Changing decimal places
    By stupesek in forum Reports
    Replies: 12
    Last Post: 09-01-2010, 11:33 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