Email Issue

  • Thread starter Thread starter Stockwell43
  • Start date Start date
S

Stockwell43

Hello,

I am having an issue emailing from my form. I have a command button set up
to email from Outlook and it's coded for certain fields to pull from the form
and insert in the email. It worked fine for as long as I can remember but
when I tried it today nothing happens. There are about 3000 records in the
database and I have a computer that's a year old. Why all of the sudden does
this not work? Here is the code behind the button:

Private Sub Command41_Click()
On Error GoTo EH
Dim SendTo As String, SendCC As String, MySubject As String, MyMessage
As String
SendTo = ""
SendCC = ""
MySubject = "Loan Alert!!!"
MyMessage = vbCr & vbCr & Me.CustLast & ", " & Me.CustFirst & vbCr &
Me.DateIn.Name & ": " & Me.DateIn & _
vbCr & Me.LoanNumber.Name & ": " & Me.LoanNumber & vbCr & Me.Status.Name
& ": " & Me.Status & _
vbCr & Me.StatusUpdate.Name & ": " & vbCr & Me.StatusUpdate
DoCmd.SendObject acSendNoObject, , , SendTo, SendCC, , MySubject,
MyMessage, True


EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
End Sub

Thanks!!!
 
Oh, one more thing. It is also now giving me a Complie Error: Method or data
not found and it's highlighting the Me.CustFirst.

This never happened before whether there is a first and last name or just an
entity name in the last name field and the first name blank it always worked
before. Does anyone know why this is all happening all of the sudden?

Thanks!!
 
Back
Top