View Full Version : Putting data from more than one table into columns


garywood84
08-17-2009, 03:24 PM
I have three tables:

Centres
Contacts
Centre-Contacts

where Centre-Contacts relates Centres and Contacts by ID numbers.

More than one Contact can be assigned to a Centre, and I want to output a list of all Centres and their contacts.

Of course, I can do this using a query by pulling all the required fields from both Centres and Contacts. However, any Centre that has more than one contact apperas in the Query output twice: once with each Contact.

Is there a way I can get Access to list each Centre only once, and put the Contact data into repeated columns?

I.e. instead of (simplified for numebr of fields):

Centre 1 / Address / Contact name
Centre 1 / Address / 2nd contact name
Centre 2 / Address / Contact name

have:

Centre 1 / Address / Contact name 1 / Contact name 2
Centre 2 / Address / Contact name

Many thanks in advance for any pointers.

Gary

Uncle Gizmo
08-17-2009, 04:06 PM
I did something similar a while back... You may be able to utilise it....

See Here: (http://www.access-programmers.co.uk/forums/showpost.php?p=308045&postcount=2)