My Assistant
![]() ![]() |
|
|
Apr 4 2012, 01:36 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 108 From: Grand Rapids |
Hello everyone,
I was not able to find a discussion regarding this but I am basically trying to send an email and in the body I want to add a field from the form. Here is the code that I am currently using to send the email and attachment but can not figure out how to add that field to the subject: CODE DoCmd.SendObject acReport, "rpt_DefectRequestData", "HTML (*.html)", "", "", "", "Defect / PID / 54 Request", "", True, "" Any ideas or help would be great Thanks, |
|
|
|
Apr 4 2012, 02:03 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 8,129 From: CT |
this is untested but in the proper position between your commas, try this .. forms!yourformname!yourfield
|
|
|
|
Apr 4 2012, 02:07 PM
Post
#3
|
|
|
Access Wiki and Forums Moderator Posts: 47,958 From: SoCal, USA |
Hi,
What version of Access are you using? Please remember to select the version number when posting questions in case it becomes relevant to the discussion. ...I am basically trying to send an email and in the body I want to add a field from the form. ...but can not figure out how to add that field to the subject: I'm sorry but your question is a little ambiguous. Did you want to add the field in the Body or the Subject? Just my 2 cents... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
Apr 5 2012, 10:34 AM
Post
#4
|
|
|
UtterAccess Addict Posts: 108 From: Grand Rapids |
Sorry about that I thought I had selected the version on the original post. This is being done in 2003.
I am trying to get this to go into the subject line so when an email string happens the users are aware of what ID to check. I tried the code that Bob advised of but was not successful. |
|
|
|
Apr 5 2012, 10:37 AM
Post
#5
|
|
|
UtterAccess Addict Posts: 108 From: Grand Rapids |
Ok nevermind I got the code from Bob to work.
I had placed inside the " " that I already had there. Once I moved it outside of those it worked perfectly. Thank you, |
|
|
|
Apr 5 2012, 11:14 AM
Post
#6
|
|
|
Access Wiki and Forums Moderator Posts: 47,958 From: SoCal, USA |
Hi,
Glad to hear you got it sorted out. Sorry about that I thought I had selected the version on the original post. This is being done in 2003. For future reference, if you "preview" your post before submitting it, you will have to select the version number again or it will not show up. Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 05:09 PM |