How to concatenate records from colunm

M

Mike

Hi Guys
I run the membership Db for a charity and I am looking for a way to produce
a list of email addresses that I can use to send out the newsletter.
I have a master table TblMembers with a number of related tables that
contain information on Districts and qualifications.
I am looking at how to create a query that will produce the District Name in
One Column followed by a list of email addresses (Taken from the TblMaster,
Fd_Email) seperated by a :
In effect I would get:-
Fd_Scheme
Fd_email

Wiltshire
(e-mail address removed); (e-mail address removed); (e-mail address removed); (e-mail address removed)

Devon
(e-mail address removed); (e-mail address removed)


Thanks in advance

Mike
 
D

Dirk Goldgar

Hi Guys
I run the membership Db for a charity and I am looking for a way to
produce a list of email addresses that I can use to send out the
newsletter.
I have a master table TblMembers with a number of related tables that
contain information on Districts and qualifications.
I am looking at how to create a query that will produce the District Name
in One Column followed by a list of email addresses (Taken from the
TblMaster, Fd_Email) seperated by a :
In effect I would get:-
Fd_Scheme
Fd_email

Wiltshire
(e-mail address removed); (e-mail address removed); (e-mail address removed); (e-mail address removed)

Devon
(e-mail address removed); (e-mail address removed)


That will require a little VBA code. Fortunately, there's a function named
fConcatChild posted here:

http://www.mvps.org/access/modules/mdl0004.htm

that you can copy, paste into a standard module in your database, and then
call from a query that might look something like this:

SELECT
Fd_Scheme,
fConcatChild("TblMaster","Fd_Scheme","Fd_Email","String",[Fd_Scheme])
AS EmailList
FROM TblDistricts

That's assuming you have a table of districts named "TblDistricts" and a
text field named "Fd_Scheme" in both tables, identifying the district. That
probably doesn't correspond exactly to your table setup, but you should be
able to adapt it as needed.
 
B

Bob Quintal

Hi Guys
I run the membership Db for a charity and I am looking for a way
to produce a list of email addresses that I can use to send out
the newsletter. I have a master table TblMembers with a number of
related tables that contain information on Districts and
qualifications. I am looking at how to create a query that will
produce the District Name in One Column followed by a list of
email addresses (Taken from the TblMaster, Fd_Email) seperated by
a : In effect I would get:-
Fd_Scheme
Fd_email

Wiltshire
(e-mail address removed); (e-mail address removed); (e-mail address removed);
(e-mail address removed)

Devon
(e-mail address removed); (e-mail address removed)


Thanks in advance

Mike

You can use a function called fConcatChild() available from
http://www.mvps.org/access/modules/mdl0004.htm

but you are better just sending separate emails as many spamfilters
are rejecting mailings with more that 4 or 5 addressees.
 
J

John W. Vinson

Hi Guys
I run the membership Db for a charity and I am looking for a way to produce
a list of email addresses that I can use to send out the newsletter.
I have a master table TblMembers with a number of related tables that
contain information on Districts and qualifications.
I am looking at how to create a query that will produce the District Name in
One Column followed by a list of email addresses (Taken from the TblMaster,
Fd_Email) seperated by a :
In effect I would get:-
Fd_Scheme
Fd_email

Wiltshire
(e-mail address removed); (e-mail address removed); (e-mail address removed); (e-mail address removed)

Devon
(e-mail address removed); (e-mail address removed)


Thanks in advance

Mike

You'll need a bit of not very difficult VBA code. See
http://www.mvps.org/access/modules/mdl0004.htm
for an example.
 
M

Mike

Thanks to all for the quick reply!
However I am a little unsure of how to change this to run with my
requirement?
I have a table of schemes which is related to the TblMembers all I need is
the scheme name in one cell and then the list of email addresses for all the
members of that scheme in one cell seperated by a ";" any assistance will be
appreciated.

Regards

Mike
 

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

Similar Threads


Top