Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Why email not being sent

I have this code in the afterupdate event of a checkbox.  But when the checkbox is checked true the email is not being sent.  In fact nothing is happening.

Private Sub chkbxSampleShipped_AfterUpdate()

   If Me.chkbxSampleShipped = True Then
   
Dim varName As Variant
Dim varCC As Variant
Dim varSubject As Variant

    varName = "somebody@somewhere.com"
    varCC = "somebodyelse@somewhere.com"

    varSubject = "The sample has been shipped for part # - " & [txtPartN] & ""

    DoCmd.SendObject , , , varName, varCC, , varSubject, varBody, True, False
   
    MsgBox "The samples shipped notification has been emailed to Bill and Bob."

    End If

End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial