Hello friends,
I wrote some code for sending email from when I pressing the button in a form.
But when the message is opening , instead 'Me.DeliveredBy', 'Me.ManufacturerName ' and 'Me.SupplierName' I see only their 'IDs", and not the name.
Any advise, what's wrong?
Private Sub btnSendReceipt_Click()
On Error GoTo Err_btnSendReceipt_Click
Dim stDocName As String
stDocName = "Samples"
DoCmd.SendObject acSendNoObject, stDocName, acFormatHTML, _
Me.DeliveredBy, , , _
"Your Samples Have Received", _
"SLF#: " & Me.txtSLF & vbCrLf & _
"Our Item: " & Me.Item & vbCrLf & _
"Supplier Name: " & Me.SupplierName & vbCrLf & _
"Manufacturer Name: " & Me.ManufacturerName & vbCrLf & _
"Manufacturer Part Number: " & Me.ManufacturerPN & vbCrLf & _
"Quantity Received: " & Me.Quantity & vbCrLf & _
"Received On: " & Me.Received_Date() _
, True
Exit_btnSendReceipt_Click:
Exit Sub
Err_btnSendReceipt_Click:
MsgBox Err.Description
Resume Exit_btnSendReceipt_Click
End Sub
I attached all printscreens.
I wrote some code for sending email from when I pressing the button in a form.
But when the message is opening , instead 'Me.DeliveredBy', 'Me.ManufacturerName ' and 'Me.SupplierName' I see only their 'IDs", and not the name.
Any advise, what's wrong?
Private Sub btnSendReceipt_Click()
On Error GoTo Err_btnSendReceipt_Click
Dim stDocName As String
stDocName = "Samples"
DoCmd.SendObject acSendNoObject, stDocName, acFormatHTML, _
Me.DeliveredBy, , , _
"Your Samples Have Received", _
"SLF#: " & Me.txtSLF & vbCrLf & _
"Our Item: " & Me.Item & vbCrLf & _
"Supplier Name: " & Me.SupplierName & vbCrLf & _
"Manufacturer Name: " & Me.ManufacturerName & vbCrLf & _
"Manufacturer Part Number: " & Me.ManufacturerPN & vbCrLf & _
"Quantity Received: " & Me.Quantity & vbCrLf & _
"Received On: " & Me.Received_Date() _
, True
Exit_btnSendReceipt_Click:
Exit Sub
Err_btnSendReceipt_Click:
MsgBox Err.Description
Resume Exit_btnSendReceipt_Click
End Sub
I attached all printscreens.