On Oct 8, 10:39 pm, Dean <deancarst...@yahoo.comwrote:
Quote:
Hi Bob,
>
Right, first of all, I can't find any reference to fConcatChild under
Access Help. Do I need to add this from a library? I got the posts
on this site though, but it seems to all over the place and not really
the answer I need. Also, I need to identify the cells with more than
240 characters, so I can add the text "...and other" to the end of
it. Is there a way to count characters?
>
You will not find any reference to it in access, it's a user-defined
function written by Dev Ashish that you will need to paste into a
code
module as described on the web page where it lives.
http://www.mvps.org/access/modules/mdl0004.htm
To count characters, you just use the len() function. To cut the
string
to 240 characters use the left function.
I suggest that first you will need to create a temporary table, with
the Parcel_ID and a memo type field to hold the whole string, then
use
the temp table to trim to length and add the "...and other" to the
long
strings, then move the results to their new home.
Quote:
If I have a field named PARCEL_ID in a table named OWNERS_JOINED, then
how do I concatenate the OWNER_NAME field based on the PARCEL_ID
field?
>
Cheers mate
>
Dean
The following queries will do that
INSERT into Temp1 (PARCEL_ID,OWNERS_JOINED)
SELECT DISTINCT PARCEL_ID, fConcatChild("OWNERS_JOINED",
"PARCEL_ID","OWNER_NAME","STRING",[PARCEL_ID]) FROM OWNERS_JOINED
INSERT into NewTable1 (PARCEL_ID,OWNERS_JOINED)
SELECT PARCEL_ID, IIF( LEN(OWNERS_JOINED)>240,LEFT(OWNERS_JOINED,240)
&
"...and more",OWNERS_JOINED) FROM temp1