473,785 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Names In A Mail Merge Field

I need to do a mail merge letter from my database. The letter will be addressed
to small companies and in the body of the letter I need to list employees of the
company. There will be from 1 to 15 employees. My database is all set up to
provide the names and addresses of the companies and the list of employees of
each company. I need help on how to do the employee merge field when there will
be multiple employees to be listed in this field.

Anyone?

Thanks!

Traci
Nov 13 '05 #1
3 2572
Probably the easiest way is to create the form letter in Word and use Word
to connect to the table or query that contains the information you need.
After making the connection from Word to Access and specifying a table or
query, you will have access to the fields and able to place them in the
appropriate locations in your letter. See Merge under Word.

You could also create a report in Access using the fields you need placed in
the area's where needed to create your form letter.

--
G Vaught

"Traci" <tm******@earth link.net> wrote in message
news:Un******** *********@newsr ead2.news.atl.e arthlink.net...
I need to do a mail merge letter from my database. The letter will be addressed to small companies and in the body of the letter I need to list employees of the company. There will be from 1 to 15 employees. My database is all set up to provide the names and addresses of the companies and the list of employees of each company. I need help on how to do the employee merge field when there will be multiple employees to be listed in this field.

Anyone?

Thanks!

Traci

Nov 13 '05 #2
Thanks for the quick response!

Yes, I have all that! My question is how to merge a list of names into the merge
document. How do I set up the merge field to be able to merge the list of names?

Traci
"GVaught" <gl************ ****@hotmail.co m> wrote in message
news:u3******** ******@TK2MSFTN GP09.phx.gbl...
Probably the easiest way is to create the form letter in Word and use Word
to connect to the table or query that contains the information you need.
After making the connection from Word to Access and specifying a table or
query, you will have access to the fields and able to place them in the
appropriate locations in your letter. See Merge under Word.

You could also create a report in Access using the fields you need placed in
the area's where needed to create your form letter.

--
G Vaught

"Traci" <tm******@earth link.net> wrote in message
news:Un******** *********@newsr ead2.news.atl.e arthlink.net...
I need to do a mail merge letter from my database. The letter will be

addressed
to small companies and in the body of the letter I need to list employees

of the
company. There will be from 1 to 15 employees. My database is all set up

to
provide the names and addresses of the companies and the list of employees

of
each company. I need help on how to do the employee merge field when there

will
be multiple employees to be listed in this field.

Anyone?

Thanks!

Traci


Nov 13 '05 #3
Hi Traci

You can write a function which opens a recordset of the employees for the
given company (passed as an argument) and creates a string which is a list
of all the names. For example:

Function ListEmployees(C ompanyID as long) as String
Dim rs as DAO.Recordset
Dim sList as String
Set rs = CurrentDb.OpenR ecordset( _
"Select * from Employees where EmpCompany=" & CompanyID, _
dbForwardOnly)
With rs
Do until .EOF
sList = sList & !FirstName & " " & !LastName & vbCrLf
.MoveNext
Loop
.Close
End With
Set rs =- Nothing
' remove last Cr/Lf
ListEmployees = Left(sList, Len(sList)-2)
End Function

Now you can use this function in an expression in your query:
EmployeeList: ListEmployees([CompanyID])
....and then use the field EmployeeList as a merge field in your document.

This function lists one employee per line, but you might want to list them
some other way, say as a comma-separated list.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand
"Traci" <tm******@earth link.net> wrote in message
news:Un******** *********@newsr ead2.news.atl.e arthlink.net...
I need to do a mail merge letter from my database. The letter will be addressed to small companies and in the body of the letter I need to list employees of the company. There will be from 1 to 15 employees. My database is all set up to provide the names and addresses of the companies and the list of employees of each company. I need help on how to do the employee merge field when there will be multiple employees to be listed in this field.

Anyone?

Thanks!

Traci

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2643
by: Christopher Harrison | last post by:
Is there a way to store an indefinite number of keys in one field and self join them? Imagine, for example, you have a table of users with a "friends" column. Say user 1 is friends with users 9, 7, 24 and 6; then would it be possible to store this array/list/whatever-you-want-to-call-it into user 1's friends cell and extract the join in a query, some how? An easy and obvious way, that is; I can think of string processing hacks ;) Thanks...
3
3858
by: Steve | last post by:
I have a people table of about 25 fields. The table is initially created each year from 5 different sources. The records from each source are appended to the people table. Any person may be in one or multiple sources. For those in multiple sources, the data for a person may not be complete in any source. For example, a person is in three sources; source#2 has the SSN and source#3 has the membership#. For those people who are in multiple...
2
3251
by: William Wisnieski | last post by:
Hi Everyone, Access 2000 I have some code behind a button that performs a word merge with a query data source. The merge works fine. But what I'd like to do somehow is after the merge is generated (or before), assign the current date to the field in the main table the query data source is based on. Is this even possible? If so, how could I do it? Here is the code that works so far:
1
4959
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word 1. Query..I want to keep the fields seperatred. I do not want to sent on field with all accumulated languages from one person to Word. Each language should appear in the document in a separate cell Cross tables are not delivering the result I...
4
5454
by: lesperancer | last post by:
I have 3 tables (office97) tblQuote quoteNbr tblDetails ( quote : 1 <-> M: quoteDetails) quoteNbr detailLine product value
0
2772
by: Phil C. | last post by:
Hi, I'm using Access 2000. I have a Select Query that uses the MID function to separate the actual text of articles from the title of the articles. The articles are enterd into the underlying table (in a memo field) in html format, as one big block of text. The memo field is called (I named it before I realized that I needed to separate title from text).
1
4964
by: mr k | last post by:
Hi, I wanted to use mail merge with forms but Text form fields are not retained during mail merge in Word, I got the code from Microsoft but it doesn't remember the text form field options such as the maximum length of the text (which I need) and the text format (would be ideal but can do without if need be) I have posted the code below, so please can you help!?? Thanks in advance... Sub PreserveMailMergeFormFieldsNewDoc() Dim...
1
3408
by: christianlott1 | last post by:
I want to provide users with an interface to create a custom merge (all in Access, not Word). User will put in a set of brackets ("<>") in a memo field and when they click the merge button it will grab the fields listed in a tabular subform and merge it with their memo text. I was able to retrieve the code to list the column names of a table. I constructed the code to iterate the tabular subform rows and replace the brackets with the row...
1
11499
by: kirkus84 | last post by:
I am currently trying to do a multiple record mail merge through a query via a command button on a form. The query basically displays customers who have said yes to privacy. The user inputs a date into txtDate on frmDate and the clicks "View Queried Privacy Records" Once they click this it opens the query form frmPrivacy which then has a command button cmdMailmerge to perform the mail merge and print the records that result from that query. (I...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.