Results 1 to 6 of 6
  1. #1
    Kmoney is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    3

    EmailDatabaseObject in Macro

    The EmailDatabaseObject works fine when I type in a To email address but throws a wobbley when I try and use either a field name or temp variable name which contains the To address.

    What syntax is used to link the To parameter of the EmailDatabaseObject to pre-stored data?




    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    How are you setting the temp variable? The field name is reference to a form control?

    Show the macro code for analysis.

    I don't use macros, only VBA - more versatile and easier to debug.
    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
    Kmoney is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    3


    The above macro loads the TempVar with the contact email address from a form.


  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Like I said, I don't use macros, but this all looks fine to me. Have you debugged the macro? Apparently step debugging a macro is possible. Check out http://office.microsoft.com/en-us/ac...006366494.aspx

    Is this a web database?
    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.

  5. #5
    Kmoney is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    3
    No, not a web database. The error that I get is on the EmailDatabaseObject command "Unknown message recipients; the message was not sent".


    Error 2295

    However if I take out the value in the To address of the EmailDatabaseObject .... it runs fine, prompting me for a reciepient.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Well, I would have to examine the project. I don't like macros. Personally, I would convert to VBA since it is not a web app. Something about Sharepoint or other web interfaces not able to deal with VBA.
    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.

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

Similar Threads

  1. Macro Help!
    By karanvemuri in forum Reports
    Replies: 5
    Last Post: 10-09-2011, 11:56 AM
  2. Macro help
    By jcaptchaos2 in forum Access
    Replies: 2
    Last Post: 05-04-2011, 09:50 AM
  3. Macro help
    By SFC in forum Access
    Replies: 4
    Last Post: 03-09-2011, 09:05 PM
  4. Replies: 0
    Last Post: 01-12-2011, 12:43 PM
  5. Need help with macro
    By abc123 in forum Programming
    Replies: 6
    Last Post: 06-13-2010, 12:34 AM

Tags for this Thread

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