Single continuous field in a report

B

BigAl

Wonder if someone can advise.

I'd like to take a single field from a query and have all the results
printed continuously, each field separated by ; and nothing else (i.e. no
spaces).

What I'm trying to achieve in a rather "quick and dirty" manner is a listing
of e-mail addresses that I can copy and paste into OE to send a large(ish)
e-mail to an organisation's members without *too* much manual intervention.

TIA

BigAl
 
M

Marshall Barton

BigAl said:
I'd like to take a single field from a query and have all the results
printed continuously, each field separated by ; and nothing else (i.e. no
spaces).

What I'm trying to achieve in a rather "quick and dirty" manner is a listing
of e-mail addresses that I can copy and paste into OE to send a large(ish)
e-mail to an organisation's members without *too* much manual intervention.


Remove that field (and its table?) from the report's main
query. Then use Duane's function to build the list:
http://www.rogersaccesslibrary.com/...Generic Function To Concatenate Child Records'
 
B

BigAl

Marshall Barton said:
Remove that field (and its table?) from the report's main
query. Then use Duane's function to build the list:
http://www.rogersaccesslibrary.com/...Generic Function To Concatenate Child Records'

Cheers Marsh

That *nearly* does what I want but not quite.

Having changed the query to my needs (hopefully! and SQL follows) what I get
is 196 e-mail addresses concatenated into 1 record ok but I get 196
instances of it. Not too worried about that as long as I could create a
report whereby I could export one record of it as an RTF and working from
that. But I can't.

Ten minutes later and I can. 1 record of 196 addresses fits to one page if I
enlarge the field enough. 196 pages of it though. But I can do what I want
tomorrow which is excellent so thanks.

What would I need to do to make this 1 record of 196 addresses instead of
196 records of 196 addresses or should I point this at the queries group? I
know I could do a duplicates query but I'd like something a wee bit more
elegant.

SQL as promised:

SELECT Concatenate("SELECT email_address FROM test") AS EMail
FROM Test;


Thanks again

BigAl
 
C

Chuck

Make a report that has one text box in the detail section.
Paste this equation in the text box:

="<" & [e-mail] & "> " & """" & [lastname] & ", " & [firstname] & """"
note space^ note space^
4 double quotation marks^ 4 double quotation marks^

Where [e-mail] is the field name where the email address is stored. Likewise
lastname and firstname. Output will look like this:

<[email protected]> "Lastname, Firstname"

This will make one file that has one record per line. Save it as a text file
and it is in the proper format for Outlook Express to use as a distribution
list.

Chuck
--
 
B

BigAl

Chuck said:
Make a report that has one text box in the detail section.
Paste this equation in the text box:

="<" & [e-mail] & "> " & """" & [lastname] & ", " & [firstname] & """"
note space^ note space^
4 double quotation marks^ 4 double quotation marks^

Where [e-mail] is the field name where the email address is stored.
Likewise
lastname and firstname. Output will look like this:

<[email protected]> "Lastname, Firstname"

This will make one file that has one record per line. Save it as a text
file
and it is in the proper format for Outlook Express to use as a
distribution
list.

Chuck

Thanks Chuck

It had never occurred to me to look at the problem that way.
That's two new things learnt today.

Much appreciated.

BigAl
 
M

Marshall Barton

BigAl said:
That *nearly* does what I want but not quite.

Having changed the query to my needs (hopefully! and SQL follows) what I get
is 196 e-mail addresses concatenated into 1 record ok but I get 196
instances of it. Not too worried about that as long as I could create a
report whereby I could export one record of it as an RTF and working from
that. But I can't.

Ten minutes later and I can. 1 record of 196 addresses fits to one page if I
enlarge the field enough. 196 pages of it though. But I can do what I want
tomorrow which is excellent so thanks.

What would I need to do to make this 1 record of 196 addresses instead of
196 records of 196 addresses or should I point this at the queries group? I
know I could do a duplicates query but I'd like something a wee bit more
elegant.

SQL as promised:

SELECT Concatenate("SELECT email_address FROM test") AS EMail
FROM Test;


Your query is too simple to be useful ;-)

Normally, the query would want the list of names for
different groups of people. E.g.

SELECT TeamName,
Concatenate("SELECT Lname FROM Players WHERE TeamID=" &
TeamID) As MemberList
FROM Teams

If you only want the report to contain one text box with one
long list of every name in the table, then scrap the
report's record source and use

=Concatenate("SELECT email_address FROM test")

in the one text box.
 

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