Results 1 to 3 of 3
  1. #1
    hmcquade is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    11

    automated email sent from records in form

    Hi there,



    I have a form containing job information. When a job is complete i would like a command button that will create an email to another department containing some print charge fields from that form. The email will always be sent from mircosoft outlook, it will always be sent to the same receipient, the message subject will always be the same, and the body of the message will contain the following fields from my form; CustomerName; CustomerDepartment; PrintSize; PrintQuantity; TotalPrintCost; CostCode.

    Visually it does not matter what the email looks like, as long as those fields are included.

    Ideally i would like this process to be completely automated, and the email sent, but i will settle for anything right now. I have searched alot of forums, but i am finding the code quite confusing to fit with my own data.

    Could anyone please help?

    Kind Regards
    Harriet

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    What you want to do is implement the SendObject method - - that is the term to look up in VBA help and it will give you the syntax.

    You can trigger this at a command button.

    Your 'object' will be a query that collects the data that you wish sent. (which may already exist as the query that is the source of your form.....not sure...)

    hope this helps.

  3. #3
    hmcquade is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    11
    Thats brilliant, thank you! i now feel like im getting somewhere. I used:

    DoCmd.SendObject acSendQuery, "Q_PrintCostInformation", , "hmcquade@thurrock.gov.uk", , , "GIS Print Charges", "Hi Rani, Please see the latest print charge information. Please charge the customer accordingly.", False

    This sends my query for all records. What i would like to do is send the query where the PK matches that of the current record. So when i press 'complete' (my command button), it sends the print details for the current record only. I dont suppose you know where i fit this is. Will it be something i write in the query or do i add to the VBA code?

    Thank you for your help!

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

Similar Threads

  1. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  2. Automated email from access
    By jfuller in forum Access
    Replies: 3
    Last Post: 04-11-2011, 02:56 PM
  3. Automated import
    By salisbut in forum Import/Export Data
    Replies: 2
    Last Post: 07-16-2010, 12:56 PM
  4. Automated Email Reports - monthly no clicks
    By Bamber in forum Reports
    Replies: 1
    Last Post: 05-12-2010, 12:34 PM
  5. Replies: 1
    Last Post: 03-02-2010, 10:51 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