Results 1 to 14 of 14
  1. #1
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38

    Limiting decimal places

    I would like to limit the decimal places on a percentage. The working Expr is [ActiveHours]/[TotalHrsPaid]#100 What would I need to add to restrict it to display only 2 decimal points and to display the percentage sign.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When you select the control and go to the Format tab of the property sheet, what is available in the Format property?

  3. #3
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    Quote Originally Posted by RuralGuy View Post
    When you select the control and go to the Format tab of the property sheet, what is available in the Format property?
    I dont have a format property in the property sheet.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the first property listed on the Format tab of the property sheet for this control?

  5. #5
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    Quote Originally Posted by ruralguy View Post
    what is the first property listed on the format tab of the property sheet for this control?
    caption is the first

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Now select the control that is displaying your calculation and what is the first property?

  7. #7
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    The Query is run by a button on the form and the property sheet only dislpays information for the button. I cannot find any way in the property sheet to limitit the number of decimal places.

  8. #8
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    %OfHrsPaidWorked: [ActiveHours]/[TotalHrsPaid]*100 This is the expr what do I need to add to display the % sign and limit the number of decimal places to two

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you are simply displaying the raw query on the screen, not the results of the query on a form? Then how about using the Format() function?

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Each field in a query also has a Format property if you open the query in design view.

  11. #11
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    Ok I have tried that and it gives the percentage 6307.69% rather than 63.07% the decimal place is wrong or the expr is wrong I have changed it to o decimal places and it comes up wrong ?

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    As soon as you select the Percent format then you do not need to multiply by 100 any more.

  13. #13
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    Its agood job one of has brains it works perfect now thanks

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Are you ready to use the Thread tool and mark this thread as Solved?

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

Similar Threads

  1. Changing decimal places
    By stupesek in forum Reports
    Replies: 12
    Last Post: 09-01-2010, 11:33 AM
  2. Limiting fields to certain lengths......
    By softspoken in forum Access
    Replies: 5
    Last Post: 04-20-2010, 12:32 PM
  3. Replies: 16
    Last Post: 09-23-2009, 08:47 AM
  4. many decimal places in calculated fields
    By GordS in forum Access
    Replies: 1
    Last Post: 02-04-2009, 11:12 AM
  5. Limiting access to a Form
    By huskies in forum Forms
    Replies: 0
    Last Post: 12-02-2008, 09:21 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