Results 1 to 6 of 6
  1. #1
    stafjoy is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    3

    Number format issue


    My queries before a union have numbers formatted as currency. After the union query, I lose the currency format and numbers have a large number of decimal places. I've tried
    Format([$USUnit Price],0.00,2),
    but the results are text, not numbers. I've tried using the same format in both the union query itself and a subsequent query. I don't know what to try next

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,283
    I would try the CCur() function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    stafjoy is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    3
    I tried that, but the result came back as text.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,283
    What exactly did you try?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    stafjoy is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    3
    CCur(Nz([$USUnit Price])) in a union query. In queries before union, $USUnitPrice formatted as currency.

  6. #6
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    If you're using Nz() in a Query, you need to include the optional second argument ValueIfNull. If you don't, then the returned value will be a null string for any Null fields it encounters. And, since Queries can't have return multiple data types on the same Field, that means that the results will ALWAYS be a string, no matter what you do (Source).

    Try CCur(Nz([$USUnit Price], 0)) in your Query and see what happens.

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

Similar Threads

  1. Number Format to General Format
    By mkc80 in forum Access
    Replies: 2
    Last Post: 05-05-2012, 02:10 AM
  2. Code issue on Format of label
    By Gavroche in forum Reports
    Replies: 2
    Last Post: 09-14-2011, 06:19 AM
  3. Date format issue
    By di.miller in forum Queries
    Replies: 3
    Last Post: 03-17-2011, 09:36 AM
  4. Format Issue
    By trueblue7 in forum Reports
    Replies: 4
    Last Post: 12-04-2010, 10:50 PM
  5. Phone number format
    By ManvinderKaur in forum Access
    Replies: 1
    Last Post: 06-24-2010, 08:07 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 - Senior Forums