Re: Sending email with Command Button
- From: VAL <VAL@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 Nov 2005 08:20:05 -0800
TY. I will try with two commas. I don't know how to incorporate the error
handler routine you sent me in my event. Sorry - very BEGINNER. and what is
(your normal error handling code)? The event below is all I have and it was
copied from someone else's database...
"Rick Brandt" wrote:
> VAL wrote:
> > I have the following and can't seem to add what I need to it:
> >
> > Private Sub SendConfirmationEmail_Click()
> > Dim stDocName As String
> > Dim stLinkCriteria As String
> > Dim subject As String
> > Dim Message As String
> >
> > If IsNull([Email]) Or [Email] = "" Then
> > MsgBox "There is no E-mail for this Delegate!"
> > Exit Sub
> > Else
> > stLinkCriteria = Me![Email]
> > stsubject = "Registration Confirmation"
> > stMessageText = "this is a test"
> > DoCmd.SendObject acSendNoObject, , , stLinkCriteria, , ,
> > stsubject, stMessageText
> > End If
> > End Sub
> >
> > What I need is:
> > 1) Bcc (I have tried every variation... obviously I don't understand
> > the syntax...)
> > 2) How to not get a "Error/Debug" message when the user changes
> > his/her mind and doesn't send the email
> >
> > THANK YOU
> > Val
>
> The Bcc value is two "comma positions" to the right of where you are using
> stLinkCriteria. Whatever test you put in that argument will be used as the Bcc.
>
> For the latter you need an error trap that ignores error number 2501.
>
> On Error GoTo ErrHandler
>
> (your Email code )
>
> Egress:
> Exit Sub
>
> ErrHandler:
> Select Case Err.Number
> Case 2501
> 'ignore
> Case Else
> (your normal error handling code)
> End Select
> Resume Egress
> End Sub
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>
>
>
.
- Follow-Ups:
- Re: Sending email with Command Button
- From: PC Data***
- Re: Sending email with Command Button
- References:
- Re: Sending email with Command Button
- From: Rick Brandt
- Re: Sending email with Command Button
- Prev by Date: Re: Delete command
- Next by Date: Re: Outlook Express Accounts,no server listed
- Previous by thread: Re: Sending email with Command Button
- Next by thread: Re: Sending email with Command Button
- Index(es):