Insert Mutiple address automatically

G

GEORGIA

I have:
DoCmd.SendObject acSendQuery, "reminder", "MicrosoftExcel(*.xls)",
[User_Name], , , "reminder", "Remider", True
on my "Email" command button. Problem is that if there are more than one
name in the " User Name", it only puts the first name. How would like make
it where it will insert all the name from " User_Name" into " TO:" field when
I am sending the email. Thank you!
 
G

GEORGIA

Yes, this is in Access Database Form. The command button I created on the
form sends out an email based on the query, however I cannot get to insert
mutiple "UserName" in the "TO" field. It is only inserting the first name
from the first record.

Thank you!

Joseph Meehan said:
GEORGIA said:
I have:
DoCmd.SendObject acSendQuery, "reminder", "MicrosoftExcel(*.xls)",
[User_Name], , , "reminder", "Remider", True
on my "Email" command button. Problem is that if there are more than
one name in the " User Name", it only puts the first name. How would
like make it where it will insert all the name from " User_Name" into
" TO:" field when I am sending the email. Thank you!

Is all this happening in Microsoft Access? This is the Microsoft Access
Database newsgroup. It appears your question may not be related to that
database. You are much more likely to find someone with the answer if you
post your question to a newsgroup devoted to your subject.
 
G

GEORGIA

I have tried [User_Name]& ";" & [User_Name] hoping that it will insert
second user name, but it just inserted in first name twice with ";"
seperated. If anyone knows any suggestions please help!
Thank you!

Joseph Meehan said:
GEORGIA said:
Yes, this is in Access Database Form. The command button I created on
the form sends out an email based on the query, however I cannot get
to insert mutiple "UserName" in the "TO" field. It is only inserting
the first name from the first record.

OK I see. I have not done much in that area and I don't see any
specific reason, but I hope that someone who has more experience with your
problem can help out.

I was just trying to help you on your way to a better source if it was
not an Access issue.

Something just suggested a possible problem. If there is more than one
User Name how are the separated? I am suspecting that the separation
character is throwing one or another of the programs off.
Thank you!

Joseph Meehan said:
GEORGIA wrote:
I have:
DoCmd.SendObject acSendQuery, "reminder", "MicrosoftExcel(*.xls)",
[User_Name], , , "reminder", "Remider", True
on my "Email" command button. Problem is that if there are more
than one name in the " User Name", it only puts the first name.
How would like make it where it will insert all the name from "
User_Name" into " TO:" field when I am sending the email. Thank
you!

Is all this happening in Microsoft Access? This is the
Microsoft Access Database newsgroup. It appears your question may
not be related to that database. You are much more likely to find
someone with the answer if you post your question to a newsgroup
devoted to your subject.
 
J

John Vinson

I have:
DoCmd.SendObject acSendQuery, "reminder", "MicrosoftExcel(*.xls)",
[User_Name], , , "reminder", "Remider", True
on my "Email" command button. Problem is that if there are more than one
name in the " User Name", it only puts the first name. How would like make
it where it will insert all the name from " User_Name" into " TO:" field when
I am sending the email. Thank you!

What's the structure of your Table, and of the query that you're
sending? The field User_Name (in a properly designed table) can only
HAVE one value! And do you mean the "first name" as in "Georgia", or
the first of several names stored in the table?


John W. Vinson[MVP]
 
J

John Vinson

GEORGIA said:
I have tried [User_Name]& ";" & [User_Name] hoping that it will
insert second user name, but it just inserted in first name twice
with ";" seperated. If anyone knows any suggestions please help!
Thank you!

Sorry I don't have an answer for you, but I suspect that semi-colon is
the problem.

Nope - if the record has a field called [User_Name] then this
expression would do exactly what it's doing: take the value of
[User_Name], append a semicolon, and then append the value of
[User_Name] again. It's doing precisely what Georgia is asking it to
do (which, alas, is not what she *wants* it to do)...

See my reply in the thread. Need VBA to string multiple records into
one record.

John W. Vinson[MVP]
 
G

GEORGIA

My table has following:
Invoice#, Comments,UserName, and reminderDate.

User put name in the userName and the date they want it reminded.(to go back
and check on that date)

I have a query to run, where ReminderDate= date() then, I want to send an
email to the user with the attachment showing them the invoice #.

First Name as in, UserName from the first record is only pulling in to "TO:"
field.
If there are three records with three different UserName, it will not insert
all three names into "TO:" field when using "sendobject". That is where I
cannot figure out how.

Please help!

Thank you!

John Vinson said:
I have:
DoCmd.SendObject acSendQuery, "reminder", "MicrosoftExcel(*.xls)",
[User_Name], , , "reminder", "Remider", True
on my "Email" command button. Problem is that if there are more than one
name in the " User Name", it only puts the first name. How would like make
it where it will insert all the name from " User_Name" into " TO:" field when
I am sending the email. Thank you!

What's the structure of your Table, and of the query that you're
sending? The field User_Name (in a properly designed table) can only
HAVE one value! And do you mean the "first name" as in "Georgia", or
the first of several names stored in the table?


John W. Vinson[MVP]
 
Top