Results 1 to 3 of 3
  1. #1
    Coryjacques is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    16

    Adding columns based on row criteria

    I have a table built like this:

    Name | Benefit | Price | Level
    Bob | Health | $10 | Employee
    Bob | Dental | $5 | Employee+Children
    Suzie | Health | $9 | Employee
    John | Vision | $2 | Employee


    John | Term Life| $0 | Employee
    John | Medical | $9 | Employee

    I want a table like this (one row as an example, but for all records)

    Name | Medical | Medical Price | Medical Level | Dental | Dental Price | Dental Level | Vision | Vision Price | Vision Level |
    John | Medical | $9 | Employee | | | | Vision | $2 | Employee |

    Looking for any help - I'm pretty new to SQL or the query builder (and access as a whole), so any assistance would be greatly appreciated!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you would show all columns. They would be empty or filled based on the data.

    since you didnt send any table structures, I cant guess.

  3. #3
    Coryjacques is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    16
    Quote Originally Posted by ranman256 View Post
    you would show all columns. They would be empty or filled based on the data.

    since you didnt send any table structures, I cant guess.
    The columns don't exist yet - right now the one column header is "Benefit" whereas I'm looking not only to create new columns, but pull items from the record into new columns in order to essentially make 1 record per person instead of several.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-19-2017, 10:13 AM
  2. Replies: 3
    Last Post: 10-18-2016, 08:31 PM
  3. Replies: 3
    Last Post: 08-09-2016, 01:52 PM
  4. Adding text to box based on criteria used
    By Ekhart in forum Reports
    Replies: 3
    Last Post: 07-01-2016, 01:27 PM
  5. show / hide columns based on criteria?
    By stevepcne in forum Access
    Replies: 1
    Last Post: 11-18-2011, 02:49 PM

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