Results 1 to 3 of 3
  1. #1
    cbriscoe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    2

    Use a Variable in SendObject arguments

    I would like the SendObject to use the Email address (Email_Address) from a form, when I try any iteration of Me - Me! or use brackets and call out the variable Form!FormName.TextName, it just transfers the text and does not get the form name. Is there a way to insert the variable into the following argument:

    DoCmd.SendObject acReport, "Aging Skin Care Supplement", "XPSFormat(*.xps)", Me![Email_Address], "", "", "Aging Skin Care Supplement", "Attached is your Personalized Skin Care Instructions. Be sure to contact your Profiler for any questions", True, ""

    Of course it is the Me![Email_Adress] that needs to change and I have honestly tried everything, I found some answers on the forum, but they required saving the object as a PDF first -- I tried tweaking it to work, but I am not sure if it is because we use XPS that it isn't work or something else entirely.

    Thanks so much for you help on this.


    CB

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,601
    You are correctly referencing the email variable. I am not familiar with XPS format but I think you are not correctly referencing the output format. Try:

    DoCmd.SendObject acReport, "Aging Skin Care Supplement", acFormatXPS, Me![Email_Address], "", "", "Aging Skin Care Supplement", "Attached is your Personalized Skin Care Instructions. Be sure to contact your Profiler for any questions", True, ""

    Review http://www.fmsinc.com/MicrosoftAcces...endObject.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    cbriscoe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    2
    You are just plain awesome. Thanks for your help

    CB

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using Arguments in a Procedure to do calculation
    By murfeezlaw in forum Programming
    Replies: 8
    Last Post: 11-08-2012, 01:25 PM
  2. Limit to Arguments?
    By ducecoop in forum Access
    Replies: 4
    Last Post: 11-01-2010, 01:52 PM
  3. HELP - Invalid number of arguments
    By jgelpi16 in forum Programming
    Replies: 3
    Last Post: 07-22-2010, 09:38 AM
  4. Open form arguments
    By nkenney in forum Forms
    Replies: 4
    Last Post: 04-10-2009, 08:40 PM
  5. OpenForm Action and Arguments
    By nkenney in forum Forms
    Replies: 9
    Last Post: 04-05-2009, 09:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums