Results 1 to 3 of 3

Thread: Crosstab Query

  1. #1
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts

    Crosstab Query

    I have a database that includes tblAllLocated and tblReunionAttendees. They are related by the Handle field, which is the same in both tables, and identifies the member to which the record applies.

    tblAllLocated contains the Handle and contact information for each of our 1,200 members. tblReunionAttendees contains two fields: Handle and ReunionAttended. ReunionAttended is the year of a reunion that this person attended. There have been 15 reunions, so a given member can have up to 15 entries in this table.

    I also have a query qryReunionAttendees, based on the two tables above, which gives me the information in tblReunionAttendees, but adds some of the contact information from tblAllLocated. It has the same information and number of records as tblReunionAttendees, but adds the contact information for each person listed.

    I have a Crosstab Query for tblReunionAttendees. Each of its records shows the Handle for a person who has attended one or more reunions, plus fifteen columns, one for the year of each reunion we have held. If the person attended the 2010 reunion, for example, there is a count of 1 in the 2010 column. Otherwise, the column is blank. If the person attended five reunions, each of the years he attended shows a 1.

    This Crosstab Query is very useful to me. I export it to Excel, where I can massage all the data with relative ease. But there is one thing missing: the contact information.

    So my question is this: How can I produce the same results as from my Crosstab Query, but with the contact information present for every record?
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    You can create a query that joins to the crosstab query using the Handle field, and add the contact info from tblAllLocated. It should be pretty easy - just another select query using the crosstab as one of it's "tables" .
    Wendell

  3. The Following User Says Thank You to WendellB For This Useful Post:

    Lou Sander (2016-07-17)

  4. #3
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    You were right -- it WAS easy. Worked like a charm!

    Thanks
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •