Results 1 to 4 of 4
  1. #1
    MoeIndustries is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    12

    Report Display -- Headers as Rows


    Hello, I have a query with the table below. When I run a report it naturally lists the results also as per this table. How can I get it to show the results as per the next table down? Thanks!!

    Fund Income Expenses
    Permanent 10 -7
    Unrestricted 15 -9
    Endowment 9 -4


    Permanent Unrestricted Endowment
    Income 10 15 9
    Expenses -7 -9 -4

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    That would involve a UNION query.

    SELECT Income AS Data, "Income" AS DataType, Fund FROM tablename
    UN ION SELECT Expenses, "Expenses", Fund FROM tablename;

    Now use that query as the source for a CROSSTAB query.
    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
    MoeIndustries is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    12
    Hello, thank you very much for the help - could you possibly clarify how the UNION query would need to be written? I'm still very new to UNION queries. I think I get the concept, just the execution I'm not sure of. THANKS!!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    There is no wizard or designer for UNION query, must type into SQL View of query builder.

    The first SELECT line sets the field names and datatypes. There is a limit of 50 SELECT lines.

    What exactly do you not understand about the syntax shown in the example?
    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.

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

Similar Threads

  1. Replies: 7
    Last Post: 07-04-2014, 10:35 AM
  2. Replies: 4
    Last Post: 02-25-2014, 01:09 AM
  3. Display rows where column values are the same
    By tomseattle in forum Queries
    Replies: 1
    Last Post: 07-30-2013, 12:44 PM
  4. Display multiple rows into seperate columns
    By levinkev in forum Queries
    Replies: 1
    Last Post: 08-30-2012, 11:02 AM
  5. Display all rows containing same contactid only.
    By siliconfiber in forum Queries
    Replies: 2
    Last Post: 06-28-2011, 09:05 AM

Tags for this Thread

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