Full Version: Create An Email List From A Query In Access
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
jslick76
Hi,

I have 2 tables in my db.
One table is called VOLUNTEERS and it contains a Volunteer ID (PK), volunteer name, and email address.
The other table is called COMPS. Comp tickets are provided to volunteers for shifts worked. However, one volunteer can have many comps and the volunteer is not always the person that will be using the comp. They can transfer it to someone else. I have the relationship setup correctly to accomodate this. The Comp table has CompID (PK), VolunteerID (FK), Date of Comp, Comp Name.

I would like to be able to export an .csv file so that I can do a mass email, but I would like Volunteer Name, Email and Comp Name in the file. I would like it so that any Volunteer that has more than one COMP name, all the names would display in one field as one long string maybe separate by a comma or something. That way I can just plug the fields into the email and it will list all the comp names for that volunteer.

I tried a query, but I got multiple rows of volunteer names for each comp, and that is not going to work for mass emailing. I'm not quite sure how to accomplish this. All help and tips are certainly appreciated.

Thanks,
Jslick76
theDBguy
Hi,

welcome2UA.gif

Take a look at Brent's MakeCSV() function.

Just my 2 cents... 2cents.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.