Results 1 to 2 of 2
  1. #1
    eddie_keating is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2010
    Posts
    1

    Email Query Results

    Hi -

    I am trying to set-up an automatic (i.e. no human action required) 'alert' system which will send an email (to a group of people) stating that an action is now overdue.



    At the moment I am using SendObject to email the relevant query but I am having some troubles...

    Firstly, I'd like the SendObject to automatically run when the Access database is opened but it won't. Is there another or different macro I could use? Note, in time I'd also like to set the task scheduler to open the file automatically at defined time.

    Secondly when I run it manually, I am greeted with an Outlook pop-up window where I have to allow or deny to email to be sent. Is there a way around this?

    Secondly, SendObject adding the results of the query as an attachment to the email, is there a way to have the results in the main body of text instead?

    Apologies if these questions sound noob!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    A macro named "autoexec" will run when the database opens. You could put your process there, or use RunCode to call a function that does your process (that's what I do).

    There are a number of ways around the security warning. Among them are Outlook Redemption, a free little program called ClickYes, and using CDO to send the email instead of SendObject. I've used the last two with no problems.

    You can open a recordset on the query and build an email body using values from the recordset.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Query Bug? Not returning consistent results
    By trb5016 in forum Queries
    Replies: 4
    Last Post: 06-15-2010, 12:00 PM
  2. Query not returning all of the results
    By velvettiger in forum Queries
    Replies: 4
    Last Post: 03-11-2010, 06:56 AM
  3. Query results order
    By Costa in forum Queries
    Replies: 6
    Last Post: 02-24-2010, 06:07 AM
  4. Multiple Query Results Sorted Together
    By Rawb in forum Reports
    Replies: 1
    Last Post: 12-10-2009, 04:05 PM
  5. Weird Query results
    By UCBFireCenter in forum Queries
    Replies: 0
    Last Post: 10-06-2009, 03:38 PM

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