UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Adding Field From A Form To Subject Line Of An Email    
 
   
fish521
post 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,
Go to the top of the page
 
+
Bob G
post Apr 4 2012, 02:03 PM
Post #2

UtterAccess VIP
Posts: 8,104
From: CT



this is untested but in the proper position between your commas, try this .. forms!yourformname!yourfield
Go to the top of the page
 
+
theDBguy
post Apr 4 2012, 02:07 PM
Post #3

Access Wiki and Forums Moderator
Posts: 47,914
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.

QUOTE (fish521 @ Apr 4 2012, 11:36 AM) *
...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)
Go to the top of the page
 
+
fish521
post 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.
Go to the top of the page
 
+
fish521
post 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,
Go to the top of the page
 
+
theDBguy
post Apr 5 2012, 11:14 AM
Post #6

Access Wiki and Forums Moderator
Posts: 47,914
From: SoCal, USA



Hi,

Glad to hear you got it sorted out.

QUOTE (fish521 @ Apr 5 2012, 08:34 AM) *
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 the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 10:00 PM