Hello, I have a simple form which has two things. One a cbo box which contains names. The other is a button. This button does two things. It checks the choosen name from the cbo box then using that name filters a report and opens that report and attaches that report to an email.
I need to do one more thing. I have a table where these names are pulled from. There is a yes/no field labeled email. I need to be able to check that field when I send out the report to that particular person. I have included my code. The codes does everything but update the email yes/no field. Please help. Btw I have a deadline for this.
Private Sub Open_Feedback_Click()
On Error GoTo Err_Open_Feedback_Click
Dim stDocName As String
stDocName = "Daily_Feedback"
DoCmd.OpenReport "Daily_Feedback", acPreview, , "[Sup_Email]='" & Me.cbosupervisor_name & "'"
DoCmd.SendObject acReport, "Daily_Feedback", "SnapshotFormat(*.snp)", "", "", "", "Daily Feedback Report", "Included is the daily Feedback Report", True, ""
Exit_Open_Feedback_Click:
Exit Sub
Err_Open_Feedback_Click:
MsgBox Err.Description
Resume Exit_Open_Feedback_Click
End Sub