Loop through table & gather e-mail address

L

Les

Hi Guru's,

Firstly i am not a programmer & very new to this game so please be
patient.

I have a table called "tbl_E90_Supplier_List" & i need to loop through
all the records and store all the e-mail addresses from the field
"E-mailAddress" as a variable to place all the addresses in an e-mail
to be sent.

Could you please help me with some code to do this, i do have the
e-mailing code.

Thank you in advance for any help.

best regards,
 
D

Duane Hookom

There is a generic Concatenate() function with sample usage at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane. You can
import the module into your application and use the function in a query or a
control source of a text box on a form or elsewhere.

Your expression in a control source might look like:
=Concatenate("SELECT [E-mailAddress] FROM tbl_E90_Supplier_List WHERE
[E-mailAddress] Is Not Null", ";")
 
L

Les

Hi Duane, thanks for the promp reply.
I have tried it in the following way and get an error message.
strRecipients = Concatenate("SELECT [E-mailAddress] FROM
tbl_E90_Supplier_List WHERE [E-mailAddress] Is Not Null", ";")

compile error:
sub or function not defined ?
 
L

Les

Hi Duane,

I have now and it works like a charm, thank you very, very much. best
regards,
 

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