Results 1 to 5 of 5
  1. #1
    9944pdx is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    PDX
    Posts
    44

    Queries; need assistance changing formats


    I have a field in a query that looks like this:

    decimal: CDbl([hours])*24

    issue: instead of showing 9.80 it needs be shown as 9.8

    I have right-clicked to format and it brings up the properties and the format is shown as fixed...what should it be?

    Thanks for your help.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    try
    Code:
    round(cdbl(hours)*24, 1)

  3. #3
    9944pdx is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    PDX
    Posts
    44

    needs formatting

    Thanks for your help it worked but instead of returning 9.8 it showed 9.80.
    Isn't there a format function i could add to such as: format ("#,##0.0").

    I am not sure how to add it to what you already shown me.

    Thanks again.

    -pdx
    Format (210.6, "#,##0.00")would return '210.60'
    Format (210.6, "#,##0.00")would return '210.60'

  4. #4
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    If you remove the "Fixed" format, it should do what you're looking for. If you get an error after removing "Fixed" you can try adding "General Number" in it's place.

    Fixed numbers are always shown to a certain number of decimals no matter what the value is.

  5. #5
    9944pdx is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Location
    PDX
    Posts
    44

    Thanks again

    Everything worked.

    See you next time.

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

Similar Threads

  1. two tables, different field formats, need to search
    By bairdgbaird in forum Queries
    Replies: 3
    Last Post: 09-23-2010, 08:50 AM
  2. Replies: 2
    Last Post: 08-27-2010, 10:11 AM
  3. Replies: 2
    Last Post: 08-17-2010, 01:10 PM
  4. Queries that Check field formats
    By mojers in forum Queries
    Replies: 3
    Last Post: 05-02-2010, 07:39 AM
  5. Changing field names in queries
    By scottsoo9 in forum Queries
    Replies: 1
    Last Post: 12-01-2009, 05:47 PM

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