ClowneUser
MIS
Hi,
I realise 97 is way out of date, but I've been asked to have a look at a db that 'used ' to send emails to users, but has now stopped. I'm not a access expert, so was wondering if anyone could help, below is the code that is behind the send email button. when the button is pressed it gives an Invalid use of Null error.
If anyone can see why we are getting this error, or recommend the best way to get this working I would appreciate it.
Regards,
Mick.
I realise 97 is way out of date, but I've been asked to have a look at a db that 'used ' to send emails to users, but has now stopped. I'm not a access expert, so was wondering if anyone could help, below is the code that is behind the send email button. when the button is pressed it gives an Invalid use of Null error.
Code:
Private Sub Command285_Click()
Dim Mail As String
Dim Count As Integer
Dim RetValue As Integer
RetValue = MsgBox("WARNING ! - This will send an email to all employees with Corrective Actions ", vbOKCancel)
If RetValue = vbCancel Then
Exit Sub
DoCmd.SetWarnings (0)
Else
For Count = 0 To Combo272.ListCount - 1
Combo272.Value = Combo272.ItemData(Count)
Mail = Combo272.Column(1)
DoCmd.SendObject acSendReport, "rptCorrectiveActionsList", acFormatRTF, Mail, , , "Corrective Actions report", "Please find attached a copy of your Corrective Actions Report. Can you please try to avoid any of these actions from becoming Overdue.Can you please let ... know when any action has been completed (QAdmin@xxxxxxx.co.uk) Thanks"
Next
End If
DoCmd.SetWarnings (-1)
End Sub
If anyone can see why we are getting this error, or recommend the best way to get this working I would appreciate it.
Regards,
Mick.