I'm looking for a way to summarize multiple fields of data from the same column in a single field. I've seen this page but have been unable to get it to work. I save the code listed but do not know which of the example fields would relate to my table.
Code:
SELECT CompanyName, ConcatRelated("OrderDate", "tblOrders", "CompanyID = " & [CompanyID])
FROM tblCompany;
I saw that I can create a report and select "group by," but then all the columns appear on different lines rather than summarized on one line. Here is an example of how I would like the data to appear, separated by commas or with specific dates within parentheses. The reason I want them all on one line is to provide an easier to read/more succinct summary.
e.g.
ITEM |
LOCATION |
DATE |
GORP |
EAST |
1/1/2012 |
GORP |
EAST |
2/1/2012 |
GORP |
WEST |
1/1/2012 |
FLORP |
WEST |
1/1/2012 |
displayed as:
ITEM |
LOCATION |
DATE |
GORP |
EAST |
1/1/2012, 2/1/2012 |
GORP |
WEST |
1/1/2012 |
FLORP |
WEST |
1/1/2012 |
or (even better):
ITEM |
LOCATIONandDATE |
GORP |
EAST (1/1/2012, 2/1/2012), WEST (1/1/2012) |
FLORP |
WEST (1/1/2012) |
not as:
ITEM |
LOCATION |
DATE |
GORP |
EAST |
1/1/2012 |
|
|
2/1/2012 |
GORP |
WEST |
1/1/2012 |
FLORP |
WEST |
1/1/2012 |