This will work if you only have two Value to work with but I see more than
two in some cases of your example.
Use two queries. I named the first one Query58 from Table20 so you can
change accordingly.
SELECT [RecID] & [SubID] AS Identification, First(Table20.Value) AS
FirstOfValue, Last(Table20.Value) AS LastOfValue
FROM Table20
GROUP BY [RecID] & [SubID];
SELECT Query58.Identification,
IIf([FirstOfValue]=[LastOfValue],[FirstOfValue],[FirstOfValue] & ", " &
[LastOfValue]) AS Type
FROM Query58;
> Hi folks,
>
[quoted text clipped - 24 lines]
>
> Tim
Hi,
In two steps. First, create a temp table that will get the two fields, and
unique ID (drop the table if it already exists, before)
SELECT DISTINCT id, iif(false, "", null) As concat INTO temp FROM mytable
Finally, create the various concatenations with a SET over a standard INNER
join:
UPDATE temp INNER JOIN myTable ON temp.id=mytable.id
SET temp.concat = ( temp.concat + ", " ) & mytable.value
The result is now in the table temp.
Hoping it may help,
Vanderghast, Access MVP
> Hi folks,
>
[quoted text clipped - 24 lines]
>
> Tim
Duane Hookom - 15 Sep 2005 21:47 GMT
In addition to Michael's very cool SQL method, you can do this with the
generic Concatenate function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Signature
Duane Hookom
MS Access MVP
--
> Hi,
>
[quoted text clipped - 42 lines]
>>
>> Tim
Tim - 19 Sep 2005 14:55 GMT
Thanks folks. The info is very useful.
Tim.
> In addition to Michael's very cool SQL method, you can do this with the
> generic Concatenate function found at
[quoted text clipped - 46 lines]
> >>
> >> Tim
Gigi - 03 Nov 2005 13:40 GMT
Michel,
I have used your routine and it has done exactly what I wanted.. howver the
field I have joined is a cd track and the end result of all 20 tracks has
been truncated, I changed the format from text to memo in the temp file but
it has still truncated, can you help please?
many thanks
> Hi,
>
[quoted text clipped - 42 lines]
> >
> > Tim
Michel Walsh - 03 Nov 2005 15:11 GMT
Hi,
The query update can only handle 255 chars max, in a field, even if you turn
it into a memo, before being "stored", it has to be handled internally in a
standard field.
Vanderghast, Access MVP
> Michel,
>
[quoted text clipped - 56 lines]
>> >
>> > Tim
Gigi - 03 Nov 2005 15:35 GMT
Hi,
is there any other way I can do this?
many thanks
> Michel,
>
[quoted text clipped - 51 lines]
> > >
> > > Tim
Michel Walsh - 03 Nov 2005 17:24 GMT
Hi,
Have you tried the solution proposed by Duane?
Hoping it may help,
Vanderghast, Access MVP
> Hi,
>
[quoted text clipped - 63 lines]
>> > >
>> > > Tim
Gigi - 03 Nov 2005 21:16 GMT
ok will look at now, thanks again
> Hi,
>
[quoted text clipped - 70 lines]
> >> > >
> >> > > Tim