Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

SendObject Macro

Discussion in 'Information Technology' started by mgiardina05, Jul 28, 2006.

  1. mgiardina05

    mgiardina05
    Expand Collapse
    Guest

    I'm trying to write a SendObject Macro that auto pouplates the To: Field from
    a control.

    This is what shows up in the Email To: Line.
    [Forms]![Main]![EmployeeEmail]
     
  2. Loading...

    Similar Threads Forum Date
    Microcosm and Macrocosm Gurmat Vichaar Mar 20, 2009
    Adobe Unruffled by Macromedia Restatement (AP) Interfaith Dialogues May 4, 2005
    Macromedia Flash animation and designing. Interfaith Dialogues Oct 21, 2004

  3. Roger Carlson

    Roger Carlson
    Expand Collapse
    Guest

    Sorry, but macros cannot accept variables. In order to do this, you must
    convert your Macro to Code. To do this, right-click on the macro name then
    choose Save As. In the As box, choose Module. This will convert it to VB
    code something like this:

    DoCmd.SendObject acTable, "Table1", "RichTextFormat(*.rtf)", "xxx",
    "xxxx", "xxxxx", "xxxxxx", "xxxxxx", False, ""

    The x's represent the To, CC, BCC, Subject, and Message. This is where you
    would put your variable:

    DoCmd.SendObject acTable, "Table1", "RichTextFormat(*.rtf)", "
    [Forms]![Main]![EmployeeEmail]", "xxxx", "xxxxx", "xxxxxx", "xxxxxx", False,
    ""


    --
    --Roger Carlson
    MS Access MVP
    Access Database Samples: www.rogersaccesslibrary.com
    Want answers to your Access questions in your Email?
    Free subscription:
    http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



    "mgiardina05" <mgiardina05@discussions.microsoft.com> wrote in message
    news:66C48D11-0C17-498B-A75A-3F28A4C0F0D9@microsoft.com...
    > I'm trying to write a SendObject Macro that auto pouplates the To: Field

    from
    > a control.
    >
    > This is what shows up in the Email To: Line.
    > [Forms]![Main]![EmployeeEmail]
     
  4. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Mgiardina05

    You need to precede it with a = sign.
    =[Forms]![Main]![EmployeeEmail]

    --
    Steve Schapel, Microsoft Access MVP

    mgiardina05 wrote:
    > I'm trying to write a SendObject Macro that auto pouplates the To: Field from
    > a control.
    >
    > This is what shows up in the Email To: Line.
    > [Forms]![Main]![EmployeeEmail]
     

Share This Page