Results 1 to 3 of 3
  1. #1
    wmmcpherson is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    1

    Crosstab Query - Roll up Row Headings to one row


    I have a crosstab query that is pulling the following: All of the Column Heading values are text
    ID Benefit1 Notes All Benefit CO CT IDAHO VT
    10818-09-1 14-INPATIENT HOSP R&B 500/PER DAY/15/ 31
    10818-09-1 14-INPATIENT HOSP R&B 500/PER DAY/15/ CO Exclude Others
    10818-09-1 15-INPATIENT HOSP ICU 1000/PER DAY/15/ 31
    10818-09-1 15-INPATIENT HOSP ICU 1000/PER DAY/15/ CO Exclude Others
    10818-09-1 16-INPATIENT HOSP SUBSTANCE 500/PER DAY/15/ 31
    10818-09-1 16-INPATIENT HOSP SUBSTANCE 500/PER DAY/15/ CO Exclude Others CO Exclude Others
    10818-09-1 17-INPATIENT HOSP MH R&B 250/PER DAY/15/ 31
    10818-09-1 17-INPATIENT HOSP MH R&B 250/PER DAY/15/ CO Exclude Others
    10818-09-1 17-INPATIENT HOSP MH R&B 250/PER DAY/15/ MH-Parity

    How do I make it look like this? So that none of the Benefit1 rows are repeated and the column heading values are all shown on one line?

    ID Benefit1 Notes All Benefit CO CT IDAHO VT
    10818-09-1 14-INPATIENT HOSP R&B 500/PER DAY/15/ CO Exclude Others 31
    10818-09-1 15-INPATIENT HOSP ICU 1000/PER DAY/15/ CO Exclude Others 31
    10818-09-1 16-INPATIENT HOSP SUBSTANCE 500/PER DAY/15/ CO Exclude Others CO Exclude Others 31
    10818-09-1 17-INPATIENT HOSP MH R&B 250/PER DAY/15/ CO Exclude Others 31 MH-Parity

    Thank you for any help.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Q1, that is the base query for the Crosstab, should ignore null recs.
    then the Crosstab will only have items with data.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,426
    what does the source table look like? It may be better to construct your query a different way.

    Otherwise consider using/adapting the concatrelated function (google to find out more) to work off your crosstab in a separate query

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

Similar Threads

  1. Replies: 3
    Last Post: 12-30-2016, 03:55 PM
  2. Replies: 1
    Last Post: 02-13-2016, 06:38 PM
  3. Dynamic Dates in Crosstab Column Headings
    By air3jxt in forum Queries
    Replies: 5
    Last Post: 03-05-2014, 05:57 PM
  4. Setting crosstab headings dynamically
    By dougie in forum Queries
    Replies: 3
    Last Post: 01-18-2012, 12:47 PM
  5. Replies: 1
    Last Post: 07-30-2010, 10:28 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