G
Guest
I'm trying to send an email that includes data from the current record.
Private Sub Command56_Click()
DoCmd.SendObject acSendNoObject, , , DLookup("[Email Address]", "[ID #s]",
"[ID] = Forms![NewAddQI]![Team Leader]"), "this is just a list of email
addresses, taken out for obvious reasons", , "QI Notification", "QI # =" &
Me![QI #] & Chr(10) & "Lot Disposition =" & Me![Lot Disposition] & Chr(10) &
"Rejection Type= " & Me![Rejection Type] & Chr(10) & "MO#= " & Me![MO#] &
Chr(10) & "Part #= " & Me![Part #] & Chr(10) & "Customer/Vendor= " &
Me![Customer].Column(1) & Chr(10) & "Shade= " & Me![Shade] & Chr(10) & "Batch
Code=" & Me![Batch Code] & Chr(10) & "Reject Qty = " & Me![Reject Qty] &
Me![Units] & Chr(10) & "Reject Reason = " & Me![Rejection Reason], , False
I copied this out of another database and it works just find. I have taken
everything out of this piece by piece but no matter what I do I still get
this error:
"A problem occured while Microsoft Office Access was communicating with the
OLE server or ActiveX Control."
I've double checked and all my fields are referenced correctly, best I can
tell. I went in to VB and checked I seem to have all the right references
checked.
Does anyone have suggestions for what to look at next? I'm weak at best
with this.
Thanks in advance.
End Sub
Private Sub Command56_Click()
DoCmd.SendObject acSendNoObject, , , DLookup("[Email Address]", "[ID #s]",
"[ID] = Forms![NewAddQI]![Team Leader]"), "this is just a list of email
addresses, taken out for obvious reasons", , "QI Notification", "QI # =" &
Me![QI #] & Chr(10) & "Lot Disposition =" & Me![Lot Disposition] & Chr(10) &
"Rejection Type= " & Me![Rejection Type] & Chr(10) & "MO#= " & Me![MO#] &
Chr(10) & "Part #= " & Me![Part #] & Chr(10) & "Customer/Vendor= " &
Me![Customer].Column(1) & Chr(10) & "Shade= " & Me![Shade] & Chr(10) & "Batch
Code=" & Me![Batch Code] & Chr(10) & "Reject Qty = " & Me![Reject Qty] &
Me![Units] & Chr(10) & "Reject Reason = " & Me![Rejection Reason], , False
I copied this out of another database and it works just find. I have taken
everything out of this piece by piece but no matter what I do I still get
this error:
"A problem occured while Microsoft Office Access was communicating with the
OLE server or ActiveX Control."
I've double checked and all my fields are referenced correctly, best I can
tell. I went in to VB and checked I seem to have all the right references
checked.
Does anyone have suggestions for what to look at next? I'm weak at best
with this.
Thanks in advance.
End Sub