Group multiple items for a single condition

M

magicdds-

On Cindy Meister's web page:

http://homepage.swissonline.ch/cindymeister/mergfaq1.htm#DBPic

she suggests one way to Group multiple items for a single condition is to:

You can create a user-defined function in your Access database that
concatenates all items for the list into a single string. Place this function
in an expression in the query you will be using as a datasource so that it
can be selected as a single field in the mail merge. Please note that this
method only works when the merge link method is DDE; ODBC drivers do not
recognize user-defined functions. An example of such a function and a query
using it is in the file WdAcc95.zip for Office 95 (51 KB); WdAcc97.zip for
Office 97 and later (131 KB).

I now have the concatinated single string merging into my Word document.
Does anyone know what I should do with it so that the items will print in a
list?

Thanks,
Mark
 
D

Doug Robbins - Word MVP

If you defined your concatenate function so that it inserted a special
character between each item in the list, you could then use edit replace in
Word to replace those characters with a carriage return.

However, why not just use an Access report?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

magicdds-

I can't use an Access report because I want the user to take the data that is
being merged to Word and create a custom letter that they design, according
to their desire. When the user clicks on a button on a form, Albert Kallal's
letter merging form is opened. The user can create a letter using the
mergefields from a query in the database. One of the mergefields is the
concatinated data. The user will be using Access's forms, but will not be
able to write their own reports.

If I have a comma in between each item in the list, could you tell me how to
use edit replace to replace the commas. (I never used edit replace before.)

Thanks
Mark
 
M

magicdds-

I forgot to add that if you meant that I should use the Edit on the menu bar
and then click on Replace, I am looking for the commas to be replaced
automatically during the merge and also that only the commas in the
mergefield get replaced, not he whole letter. I would need for the
replacement of the commas to be coded in to take place during the merge.

Thanks
Mark
 
D

Doug Robbins - Word MVP

It is time to realise that there are somethings that mail merge cannot do.
Maybe a "roll-your-own" vba equivalent to mail merge is what you will need.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top