Populate Email Subject Line

  • Thread starter Richard Messer via AccessMonster.com
  • Start date
R

Richard Messer via AccessMonster.com

I need to populate the subject line of my email with the TrackingNo which
is the autonum on my form. When I click the submit button, it should send
an email to the person along with the trackingno in the subject line.
Everything is working EXCEPT the subject line. Here's my code:

Private Sub Submit_Click()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strCC As String 'this is needed to populate the CC block on
the EMail form
Dim strSubj As String 'this is needed to populate the SUBJ block on
the EMail form

DoCmd.SendObject acSendNoObject, , , Me.AssignedTo.Column(1), , , "", "YOU
HAVE AN ISSUE TO RESOLVE. Please go to the Discrepancy Tool and resolve
within 3-days. THANK YOU!"
DoCmd.SendObject acSendNoObject, , , , , , "&[Me.TrackingNo]& " '"


End Sub

Thanks,
Richard
 
R

Richard Messer via AccessMonster.com

okay I got it. Figured out all I needed was one line. See below. It fills
in the email address, the subject line and the text.

DoCmd.SendObject acSendNoObject, , , Me.AssignedTo.Column(1), , ,
[TrackingNo], "YOU HAVE AN ISSUE TO RESOLVE.

Maybe this will help someone else.

Richard
 
G

Guest

Any particular reason why you used [TrackingNo] instead of Me.TrackingNo ?
Just curious.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top