I('m not sure if I understood the question properly. If your want to have a
routine the selectively send an e-mail to one individual or another based on
a criteria you'd need to create an if statement
***********
Dim sSubject As String
Dim sMessage As String
Dim sRecipient As String
If YourCriteria Then
sRecipient = "(E-Mail Removed)"
Else
sRecipient = "(E-Mail Removed)"
End If
sSubject = "Secretary Request No. "
sMessage = "If you could take a look at this, deeply appreciate it!
THX!" & vbCrLf & " "
DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
DoCmd.Close
*********
You could also send each e-mail message separatly, ie:
*********
Dim sSubject As String
Dim sMessage As String
sSubject = "Secretary Request No. "
sMessage = "If you could take a look at this, deeply appreciate it!
THX!" & vbCrLf & " "
DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage,
True
DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage, True
DoCmd.Close
*********
If this isn't what you need, please explain more and I'm sure I can help you
out.
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples:
http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
"Chi" wrote:
> Hi Daniel,
>
> I would like to let you know that I didn't create the DoCmd. SendOject.
> Someone else do it. The original coding has two email addresses in the
> argument, but I took one out. I remember that the other email address located
> above the current one. I took it out and now I don't know how to put it
> back since I did it for a few months ago.
> I always get error messages since I don’t know anything about coding. sorry.
> Thank you so much
> Chi
>
> "Daniel Pineault" wrote:
>
> > Nothing could be simpler. If you look at the help file you see they specify:
> > " Separate the recipient names you specify in this argument and in the cc
> > and bcc arguments with a semicolon (
"
> >
> > So try something like
> > ...
> > "(E-Mail Removed);(E-Mail Removed)",
> > ...
> >
> > --
> > Hope this helps,
> >
> > Daniel Pineault
> > http://www.cardaconsultants.com/
> > For Access Tips and Examples: http://www.devhut.net
> > Please rate this post using the vote buttons if it was helpful.
> >
> >
> >
> > "Chi" wrote:
> >
> > >
> > > Hi,
> > >
> > > The DoCmd.SendObject below works fine. Would you please show me how I can
> > > add another email address to it. Ex: (E-Mail Removed).
> > >
> > >
> > >
> > > Private Sub EmailRequest_Click()
> > > DoCmd.SendObject _
> > > , _
> > > , _
> > > , _
> > > "(E-Mail Removed)", _
> > > , _
> > > , _
> > > "Secretary Request No. ", _
> > > "If you could take a look at this, deeply appreciate it! THX!" &
> > > vbCrLf & " ", _
> > > True
> > > DoCmd.Close
> > > End Sub
> > > ----------------------------------------
> > >
> > >
> > > Thanks
> > > Chi
> > >