Combine Records into one in Access

TyeReece

Board Regular
Joined
Aug 3, 2007
Messages
136
I am trying to run a query that returns two fields,. A name and the county. Of course there are multiple counties so I want to combine those records into one field. I have the following SQL that gives me what I need except for combining all the counties into one field. What needs to be added to this SQL to return one row per name with all the counties associated with that name in one field?

VBA Code:
SELECT PCC_Vendor_Number.FPName, County_List.County
FROM ((PCC_PNum INNER JOIN PCC_Vendor_Number ON PCC_PNum.PCC_VNum = PCC_Vendor_Number.PCC_VNum) INNER JOIN Placements ON PCC_Vendor_Number.PCC_VNum = Placements.PCC_VNum) INNER JOIN County_List ON PCC_PNum.County = County_List.CountyID
WHERE (((PCC_Vendor_Number.PlaceType)=7) AND ((PCC_Vendor_Number.ClosedDate) Is Null) AND ((Placements.datDischarge) Is Null))
GROUP BY PCC_Vendor_Number.FPName, County_List.County
ORDER BY PCC_Vendor_Number.FPName, County_List.County;
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Watch MrExcel Video

Forum statistics

Threads
1,114,314
Messages
5,547,162
Members
410,775
Latest member
alal1030
Top