I have a table containing details of tenants. Each record has: fldPropertyID, fldTenantID, fldFirstname, fldLastname, etc.
I want to generate a mail-merge data source from this table using a query so that the output is grouped on the PropertyID field but with the tenant's names for each property combined together, as follows.
fldPropertyID | Tenant1.fldFirstname fldLastname Tenant2.fldFirstname fldLastname [Tenant3.fldFirstname fldLastname] etc
The idea is that in any letters to the tenants the combined tenants names could be displayed as a single merge field like so:
For the atten of: James Jones, Mary Smith, Roy Rogers and Peter Piper
It seems to me that the query needs a variable that can contain the names from successive rows within each group and then for that variable to be emptied at the start of each new row group. Or perhaps I should create a Public Function to concatenate the names for each PropertyID. I have been pondering this problem for several months and I haven't figured out a workable solution yet. Any help would be, well you know.