Private Sub Command53_Click()
On Error GoTo Err_Command53_Click
Dim stWhere As String '-- Criteria for DLookup
Dim varTo As Variant '-- Address for SendObject
Dim stText As String '-- E-mail text
Dim RecDate As Variant '-- Rec date for e-mail text
Dim stSubject As String '-- Subject line of e-mail
Dim stTracking As String '-- The tracking number from form
Dim stReceiver As String '-- The receiver from form
Dim stItems As String '-- The items belong to from form
Dim stRAname As String '-- The RA name from form
Dim stRAphone As String '-- The RA phone from form
Dim stContract As String '-- The contract number from form
Dim stVendor As String '-- The vendor from form
Dim stDescription As String '-- The description from form
Dim stWho As String '-- Reference to tblSupply
'-- Who to send email to
stWho = Me.txtRAname
stWhere = "tblSquadrons.strRAname = " & "'" & stWho & "'"
'-- Looks up email address from TblUsers
varTo = DLookup("[strRAemail]", "tblSquadrons", stWhere)
stSubject = ":: TMO Ticket Information ::"
RecDate = Me.txtDate
stReceiver = Me.txtReceiver
stItems = Me.txtItems
stRAname = Me.txtRAname
stRAphone = Me.txtRAphone
stTracking = Me.txtTracking
stContract = Me.txtContract
stVendor = Me.txtVendor
stDescription = Me.txtDescription
stText = "Here is the information for the product being received." & Chr$(13) & Chr$(13) & _
"Received Date: " & RecDate & Chr$(13) & Chr$(13) & _
"Receiver at TMO: " & stReceiver & Chr$(13) & _
"Items belong to: " & stItems & Chr$(13) & _
"RAs Name: " & stRAname & Chr$(13) & _
"RAs Phone Number: " & stRAphone & Chr$(13) & Chr$(13) & _
"Tracking/Frieght Number: " & stTracking & Chr$(13) & _
"Contract/PO Number: " & stContract & Chr$(13) & _
"Vendors Name: " & stVendor & Chr$(13) & _
"Description of Items: " & stDescription & Chr$(13) & Chr$(13) & _
"This is an automated message. Please do not respond to this e-mail."
'Write the e-mail content for sending to assignee
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, -1
Exit_Command53_Click:
Exit Sub
Err_Command53_Click:
MsgBox Err.Description
Resume Exit_Command53_Click
End Sub