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;
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top