P
Paul Worsnop
Hi,
I am in the process of developing a form which automatically emails people a
report.
I have it working and attaching the relevant report. However there is one
area that is not working as I would like it to.
The form has 3 fields as potentially the report could need to be emailed to
3 different people at a particular organisation. These are called
suppleremail, supplieremailtwo and supplieremailthree on the form.
I have attempted to add each of these fields, separated in the code with a
semi colon as follows:
If PRHolTable![PR Hol In] = True Then
If Me![supplier auto email] = True Then
DoCmd.SendObject acSendReport, "Requisition Report",
acFormatRTF, Me![SupplierEmail] ; Me![supplieremailtwo] ;
Me![supplieremailthree], , _
"Organisation Name Requisition - " & RacSectSubTable![RSS
Requisition No], "Please find attached automatically generated Purchase Order
- in the event of any queries please do not hesitate to contact me." _
& vbCrLf & vbCrLf & "Thankyou" & vbCrLf & vbCrLf & _
"Best Regards" & vbCrLf & "Person Name" & vbCrLf & "Person Job
Title" & vbCrLf & "Company Name" & vbCrLf & "Company Address" _
& vbCrLf & "Company Town" & vbCrLf & "Company Post Code" &
vbCrLf & vbCrLf & "Tel Number" & vbCrLf & "Fax Number" & vbCrLf & _
"Email: (e-mail address removed)", False
MsgBox "Email successfully sent"
End If
I get a syntax error though and cant work out what syntax I need to use?!
Can anyone help?
Thanks in advance.
I am in the process of developing a form which automatically emails people a
report.
I have it working and attaching the relevant report. However there is one
area that is not working as I would like it to.
The form has 3 fields as potentially the report could need to be emailed to
3 different people at a particular organisation. These are called
suppleremail, supplieremailtwo and supplieremailthree on the form.
I have attempted to add each of these fields, separated in the code with a
semi colon as follows:
If PRHolTable![PR Hol In] = True Then
If Me![supplier auto email] = True Then
DoCmd.SendObject acSendReport, "Requisition Report",
acFormatRTF, Me![SupplierEmail] ; Me![supplieremailtwo] ;
Me![supplieremailthree], , _
"Organisation Name Requisition - " & RacSectSubTable![RSS
Requisition No], "Please find attached automatically generated Purchase Order
- in the event of any queries please do not hesitate to contact me." _
& vbCrLf & vbCrLf & "Thankyou" & vbCrLf & vbCrLf & _
"Best Regards" & vbCrLf & "Person Name" & vbCrLf & "Person Job
Title" & vbCrLf & "Company Name" & vbCrLf & "Company Address" _
& vbCrLf & "Company Town" & vbCrLf & "Company Post Code" &
vbCrLf & vbCrLf & "Tel Number" & vbCrLf & "Fax Number" & vbCrLf & _
"Email: (e-mail address removed)", False
MsgBox "Email successfully sent"
End If
I get a syntax error though and cant work out what syntax I need to use?!
Can anyone help?
Thanks in advance.