Insert Mutiple address automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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.
 
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 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.
 
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.
 
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]
 
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.
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!

:

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.
 
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]
 
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]
 
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.

You'll need some VBA code to read all three records and create a new
string variable with them all combined. There is sample code at

http://www.mvps.org/access/modules/mdl0004.htm


John W. Vinson[MVP]
 

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

Back
Top