Results 1 to 4 of 4
  1. #1
    bloocie is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    2

    Post Help creating a crosstab query from a list

    Hi,

    I have some data which is in 2 columns in the first column is a list of ID numbers and in the second column is the corresponding appointment date. If an individual had more than one appointment their ID number will appear more than once in the list with their subsequent appointment date. For example:

    ID Appointment
    1 1/1/12
    2 1/2/12
    3 12/1/12
    4 14/1/12
    1 3/1/12
    3 2/2/12
    5 5/1/12
    6 3/3/12


    6 4/3/12
    7 31/1/12

    I would like to convert this list into a crosstab so that I have the unique ID numbers as the row headers and column headers with the number of appointments: appointment 1, appointment 2 etc with the date of the appointment in the value field e.g.

    ID Appointment 1 Appointment 2
    1 1/1/12 3/1/12
    2 1/2/12
    3 12/1/12 2/2/12
    4 14/1/12
    5 5/1/12
    6 3/3/12 4/3/12
    7 31/1/12

    Is there a way I can do this in Access? The data file is too large for excel. Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    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
    bloocie is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    2
    Thanks, concatenating the fields will return more than 255 characters. Is there no way of getting each appoinment in a seperate column?



    Quote Originally Posted by June7 View Post

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    VBA procedure is the only option I can see. Did you review the other link which has an example of 'transposing' records?
    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. Convert a crosstab set of data to a flat list
    By jamesrees02 in forum Queries
    Replies: 3
    Last Post: 02-17-2012, 06:36 PM
  2. Creating a load list for shipping
    By Reaper in forum Access
    Replies: 9
    Last Post: 11-13-2011, 07:52 AM
  3. Crosstab(?) list of software installed
    By UTMonkey in forum Queries
    Replies: 4
    Last Post: 06-25-2011, 11:59 PM
  4. Replies: 2
    Last Post: 04-01-2011, 11:30 AM
  5. Replies: 14
    Last Post: 06-24-2009, 07:36 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