By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,135 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,135 IT Pros & Developers. It's quick & easy.

Change how query outputs data? (Access 2010)

P: 23
I manage a database where we track our customer’s mailing lists. I have several different tables which store various pieces of information:
• Profile Table – ID, Name, address, customer ID, phone, etc.
• Customer Table – ID, Customer name, etc.
• Mailing Lists – ID, Mailing list name, etc.
• Invitations – Profile ID, Mailing list ID

I want to create a query that shows all the mailing lists that each person is currently on. This is easy to set up, but the results are like this:

JaneDoe CustomerX MailingList1
JaneDoe CustomerX MailingList3
JaneDoe CustomerX MailingList6
JohnDoe CustomerX MailingList1
JohnDoe CustomerX MailingList2
JohnDoe CustomerX MailingList4

Is there any way to set up my query so that the results are all grouped by the person, and that each mailing list is in its own column (and if they're not on that specific list, the field is blank for that record)?

JaneDoe CustomerX MailingList1 MailingList3 MailingList6
JohnDoe CustomerX MailingList1 MailingList2 MailingList4
Mar 26 '12 #1

✓ answered by Rabbit

Use a crosstab query.

Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,366
Use a crosstab query.
Mar 26 '12 #2

P: 23
That did it - thanks you SO much!
Mar 26 '12 #3

Expert Mod 10K+
P: 12,366
Sure thing, good luck.
Mar 26 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.