![]() |
Emailing a form
I have created a custom form using the Post form. On the form, users will
select a recipient. I want that recipient to receive an email when the form is posted. I have the following code. How do I get it to email the selected recipient? I don't want to hard-code an email address in the code because the recipient will vary. Function Item_Write() Set newItem = Application.CreateItem(0) With newItem ..To = ??? ..Subject = "New On-Site Visit Report" ..Body = "There is a new On-Site Visit Report for you to view." ..Send End With End Function |
Emailing a form
Is this an Outlook Form or a form in MS Access? There is a big difference.
If Outlook form, you will be better served in the Outlook Forum or at OutlookCode.com. If an MS Access form you would be better off saving your form as a report, basing the report on a query that specifies the current form, and then using the SendObject method to email the report. -- Jeff C Live Well .. Be Happy In All You Do "Robert" wrote: I have created a custom form using the Post form. On the form, users will select a recipient. I want that recipient to receive an email when the form is posted. I have the following code. How do I get it to email the selected recipient? I don't want to hard-code an email address in the code because the recipient will vary. Function Item_Write() Set newItem = Application.CreateItem(0) With newItem .To = ??? .Subject = "New On-Site Visit Report" .Body = "There is a new On-Site Visit Report for you to view." .Send End With End Function |
All times are GMT +1. The time now is 09:05 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com