Link to home
Start Free TrialLog in
Avatar of mlagrange
mlagrangeFlag for United States of America

asked on

Recursion using only queries?

Hello - I have to concatenate contact names associated with given client accounts for use in a mail merge routine. Is there a way to do this using only queries?

This is in an Access 2003 mde, for which I do not have the mdb (don't judge me!), so I can't add new VBA routines...

So, for an AcctNumber of "1", with 3 contacts, I can pull ContName by AcctNumber, and get:
1 Alex Adams
1 Bob Barker
1 Clyde Carter

Is there a way I can get to:
1 Alex Adams, Bob Barker, Clyde Carter
using only queries?

If I could just add a running counter to the 1st pull above, I could come off of that with a cross-tab query, forced to a fixed set of columns, and then just concatenate the names in the columns in a 3rd query. But I don't know how to generate a running counter in a query without using VBA.

So, any help with either of these problems would be very much appreciated

Thanks

ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you thought of linking to your MDE from a new MDB, so that you can then add VBA procedures?
Can you post a sample database too?
Avatar of mlagrange

ASKER

Woo-Hoo - Thanks Nicobo! That works like a charm!

Jez - all you could really link to would be the tables, right?  This is a big production app, used by about 50 users, and I'm trying to tweak this new requirement in there in the easiest way possible.

Thanks again