Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012
    Posts
    68

    Unanswered: Join 2 fields from a table into the subject of email

    So here is my code.
    Code:
    DoCmd.SendObject , , , "bsigmon@sessasheetmetal.com", "bsigmon@sessasheetmetal.com", , "A shipment has arrived for your job # " & [job name and number], "A shipment has been recieved for one of your jobs" & vbNewLine & "Items received are: " & [DESCRIPTION] & "      " & "Notes added for this item: " & [NOTES], False, ""
    I want the subject line in the email to read "A shipment has arrived for your job # (this would be a number from a table and the name from the same table)

    I have a query named "packing slips query"
    within that query i have a few fields one of which is "job number"
    another is "job name and number" which is an expression that joins 2 fields from a linked table "Jobs". job name and number: [jid] & " " & [jobs]![description]


    When i use [job number] the code works correctly
    when i use [job name and number] i receive an error


    Any ideas???
    Last edited by bsigmon1103; 02-11-14 at 15:09.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Quote Originally Posted by bsigmon1103 View Post
    when i use [job name and number] i receive an error
    Which error (error number + message)? What does [job name and number] contain when you try using the code?
    Have a nice day!

  3. #3
    Join Date
    Mar 2012
    Posts
    68
    I actually got it working. I changed the record source of the form to the "right" query. oops

    Thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •