Results 1 to 9 of 9
  1. #1
    ajsanders is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4

    Trying to automate the email process???

    I've been working with Access for about 2 weeks now. I have a table of data in which a lease end date is listed among other things. I have a query that shows all accounts that have a lease end coming up within 8 months. I have created a form that I want to send out to the reps that they can fill out and send back to update the original table.

    What I want to do:
    1: Automate the email process.
    2. Send out based off of a data in the table.
    3. Send to an email all in the table.


    3. Have the form that the rep can check boxes to update data. (HTML??? Rich Text?? etc)

    Can I use a Macro? Is there conditions that can help solve this? Do I need to use VBA in excel? Thank you for your help in advance.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps it will be easier to email a report than to email a form. You might be able to build a report based on the same query your form is bound to.

  3. #3
    ajsanders is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4
    Quote Originally Posted by ItsMe View Post
    Perhaps it will be easier to email a report than to email a form. You might be able to build a report based on the same query your form is bound to.
    So I created a report and under the external date tab, email is not an option. Is there a way to email the report?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    There are several ways. The simplest, in my opinion, is to use VBA.

    The following, sends a report.
    Code:
    Dim strSubject As String
    Dim strBody As String
    Dim strReport As String
    Dim strTo As String
    Dim strCc As String
    Dim strBcc As String
    strSubject = "Insert Subject Line Here"
    strBody = "Insert text to be displayed in the email body"
    strReport = "rptEquip"
    strTo = "you@gmail.com"
    strCc = ""
    strBcc = "me@gmail.com"
    DoCmd.SendObject acSendReport, strReport, acFormatTXT, strTo, strCc, strBcc, strSubject, strBody, False
    If you need to filter specific records to include within the report, you can open the report before emailing by adding a line of code.

    The other option is to create a macro which I do not use because I do not build applications for use over the internet. I thought it would be easy for me to Google an example of building a macro but I could not find a decent example.

  5. #5
    ajsanders is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4

    Individual Email

    Ok. So I'm trying to email it to the data to the corresponding email field. Is there a way to do that or does it have to go to whatever email i put in after -strTo = -

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    strTo is a variable. You can assign whatever value, as long as it fits into a String Variable, you want to strTo.

    There are various methods to retrieve data. DAO may be a good way to retrieve data. You could loop through a recordset and as you move to a new record, you can assign a specific field to strTo. You could also assign a specific field to the other variables like, strReport, strCC, etc.

    This thread may be beneficial to review
    https://www.accessforums.net/program...ail-42585.html

  8. #8
    ajsanders is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4

    Thank you so much

    ItsMe, thank you so much for your help. Everything is working as I planned in the beginning. Awesome stuff!!!

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Glad you were able to accomplish your task.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  2. Automate the email at desired date and time
    By A S MANN in forum Sample Databases
    Replies: 0
    Last Post: 11-08-2011, 10:56 PM
  3. Efficient Process?
    By compooper in forum Database Design
    Replies: 1
    Last Post: 06-14-2011, 03:01 PM
  4. Replies: 0
    Last Post: 08-20-2010, 09:26 AM
  5. Automate Compact and Repair process
    By tracerbullet in forum Security
    Replies: 2
    Last Post: 01-14-2010, 05:12 PM

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