Results 1 to 2 of 2
  1. #1
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529

    Format two fields in a Union Query as Currency

    I have a union query that joins two other queries. It works without exception. I would like to format two of the fields as currency. The underlying queries are formatted as currency. The two fields are the SumOfCashAmt



    Code:
    SELECT [Doubtful Sum Off Balance Entity Level].UEN,
     [Doubtful Sum Off Balance Entity Level].Name,
      [Doubtful-Sum On Balance Entity Level].SumOfCashAmt AS [ON Balance Sum],
      [Doubtful Sum Off Balance Entity Level].SumOfCashAmt AS [OFF Balance Sum],[Doubtful-Sum On Balance Entity Level].DefaultCategoryDesc AS [On Balance Desc],[Doubtful Sum Off Balance Entity Level].DefaultCategoryDesc AS [Off Balance Desc]
    FROM [Doubtful Sum Off Balance Entity Level] LEFT JOIN [Doubtful-Sum On Balance Entity Level] ON [Doubtful Sum Off Balance Entity Level].UEN = [Doubtful-Sum On Balance Entity Level].UEN;
    
    UNION
     SELECT [Doubtful-Sum On Balance Entity Level].UEN,
     [Doubtful-Sum On Balance Entity Level].Name,
      [Doubtful-Sum On Balance Entity Level].SumOfCashAmt,
     [Doubtful Sum Off Balance Entity Level].SumOfCashAmt,[Doubtful-Sum On Balance Entity Level].DefaultCategoryDesc, [Doubtful Sum Off Balance Entity Level].DefaultCategoryDesc
    FROM [Doubtful-Sum On Balance Entity Level] LEFT JOIN [Doubtful Sum Off Balance Entity Level] ON [Doubtful-Sum On Balance Entity Level].UEN = [Doubtful Sum Off Balance Entity Level].UEN;
    Your thoughts on this?

    Alan

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Got it. Duh!
    Format(table.fieldname,"Currency")

    Alan

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

Similar Threads

  1. Replies: 3
    Last Post: 12-21-2012, 02:27 PM
  2. Replies: 14
    Last Post: 11-09-2012, 01:19 PM
  3. Custom Currency Format
    By Ichigo in forum Access
    Replies: 3
    Last Post: 04-26-2011, 03:34 AM
  4. Replies: 2
    Last Post: 03-23-2011, 11:43 AM
  5. Union Query (choosing between two fields)
    By naveehgreen in forum Programming
    Replies: 1
    Last Post: 06-17-2010, 03:24 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