I've tied the code below to a button on an Access (v. 2000) form that is used to send an email notification from Outlook (v. 2000). It works great; populates the subject field, pulls values from the various form text boxes just like it should, but it only works a few times and then it won't work at all. The number of times it works is inconsistent, usually at least twice. I have to shut down Access, and when I restart it works again just fine, two or three times. When it stops working there are no error boxes or any clues as to the problem, it just won't compose another email. Has anyone had and solved a simillar problem? I'd appreciate any suggestions....
I'm using Windows 2000 SP-2.
Private Sub Command164_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim receiver As String
Dim st1 As String
Dim st2 As String
Dim st3 As String
Dim st4 As String
Dim st_full As String
receiver = Me!txt_email
st1 = ""
st2 = ""
st3 = ""
st4 = ""
st1 = "The job you submitted on " & Me!date_opened & " for" & Chr$(10)
st2 = "Project Number " & Me!project & " WBS " & Me!wbs & Chr$(10)
st3 = "Is ready for pick-up." & Chr$(10)
st4 = "The job was described as: " & Me!description
st_full = st1 & st2 & st3 & st4
DoCmd.SendObject , , , receiver, , , "Your Request #" & Me!job_id & " is Ready for Pick-up", st_full, 1
receiver = ""
End Sub
I'm using Windows 2000 SP-2.
Private Sub Command164_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim receiver As String
Dim st1 As String
Dim st2 As String
Dim st3 As String
Dim st4 As String
Dim st_full As String
receiver = Me!txt_email
st1 = ""
st2 = ""
st3 = ""
st4 = ""
st1 = "The job you submitted on " & Me!date_opened & " for" & Chr$(10)
st2 = "Project Number " & Me!project & " WBS " & Me!wbs & Chr$(10)
st3 = "Is ready for pick-up." & Chr$(10)
st4 = "The job was described as: " & Me!description
st_full = st1 & st2 & st3 & st4
DoCmd.SendObject , , , receiver, , , "Your Request #" & Me!job_id & " is Ready for Pick-up", st_full, 1
receiver = ""
End Sub