+ Reply to Thread
Results 1 to 11 of 11

ACCESS - Email current form

  1. #1
    Registered User
    Join Date
    02-14-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2003, 2007, 2010, 2016
    Posts
    10

    ACCESS - Email current form

    Hello

    I am looking for help in creating a VBA Code that will email the current form as an attachment.

    I have the command button created that will open outlook, input the subject, and body message. But I would like the form for the record I have active to be included as an attachment in the email - not all the forms.

    Is that possible?

    TIA

    Sheri

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: ACCESS - Email current form

    Look at this link

    http://www.access-programmers.co.uk/...ad.php?t=49076
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-14-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2003, 2007, 2010, 2016
    Posts
    10

    Smile Re: ACCESS - Email current form

    Thank you @alansidman

    Although, I did find this code:
    From: http://www.access-programmers.co.uk/...d.php?t=240551


    Please Login or Register  to view this content.

    I am just trying to make it work for the form I have. I do not have an invoice #, but there is a file number, and I assume the "Invoice" would be the form name. Still trying to break this apart, but a little difficult when you can't see the actual database.
    Last edited by Sherip46; 08-06-2016 at 11:27 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: ACCESS - Email current form

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html


    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

  5. #5
    Registered User
    Join Date
    02-14-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2003, 2007, 2010, 2016
    Posts
    10

    Re: ACCESS - Email current form

    Thank you, I will read up on them today.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: ACCESS - Email current form

    Did you read the link I sent you? Did you try it out? You have provided new code unrelated with no means to compare what the fields are and how they compare to your db. Suggest you upload your file scrubbed for confidential data. Probably only need your table and the bound form you are trying to export. Make sure that there are only a few records or it will be bloated and will not load. Additionally, after scrubbing, run a compact and repair and then zip the file in order to upload to this site. Click on Go Advanced and scroll down to manage attachments.

  7. #7
    Registered User
    Join Date
    02-14-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2003, 2007, 2010, 2016
    Posts
    10

    Re: ACCESS - Email current form

    Here is a sample copy of the database I am trying to work with.

    Hopefully I have done this correctly
    Attached Files Attached Files

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: ACCESS - Email current form

    Ok Sheri, I think I've got it. If you are using 2007, then use the instructions in this link.

    http://www.techrepublic.com/blog/mic...d-access-form/

    I am using 2013, so on the ribbon with the selected record open on the form, click on External--->Export--->Email--->HTML

    Because I don't use Outlook, I wasn't able to test any further. When I selected, it did bring up an Outlook Email and displayed the attachment as an HTML document. I was not aware of this feature in Access. Thanks for asking and helping me also.

  9. #9
    Registered User
    Join Date
    02-14-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2003, 2007, 2010, 2016
    Posts
    10

    Re: ACCESS - Email current form

    Thank you this might be okay - I would prefer if it looked more like the form rather than the attached image (there are a lot of blank/ false fields that would show a check mark on the form - this method does not reveal that information).

    I have read where there is the possibility of having a command button first convert the form into a PDF and then attach to an email.

    I also tried to use the "email selection as PDF" from the ribbon on the External Data tab - but even though "Only Selection" is selected, it still includes ALL the forms.
    Attached Images Attached Images
    Last edited by Sherip46; 08-08-2016 at 09:51 PM. Reason: additional information

  10. #10
    Registered User
    Join Date
    02-14-2016
    Location
    Alberta, Canada
    MS-Off Ver
    2003, 2007, 2010, 2016
    Posts
    10

    Re: ACCESS - Email current form

    I believe I may have found a solution to execute my needs.

    If I apply a filter to the forms so that only one record is visible - I can then use the 'Email' command (and select PDF option in the dialog box)on the ribbon under the 'External Data' tab. If there is only one record showing, it will attach that record as a PDF.

    Thank you for all your help

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: ACCESS - Email current form

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sending Email from a form button using text fields to build the email
    By jdoerr1021 in forum Access Tables & Databases
    Replies: 5
    Last Post: 06-05-2016, 10:22 PM
  2. Replies: 9
    Last Post: 09-16-2015, 08:45 PM
  3. Access form works with access Viewer but not full version of Access?
    By Shanyn in forum Access Tables & Databases
    Replies: 1
    Last Post: 10-22-2014, 01:14 PM
  4. VBA code to send email to the people whose email address is in the Access table
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2014, 05:11 AM
  5. ACCESS FORM: how to relate a form to 2 tables
    By Joel10952 in forum Access Tables & Databases
    Replies: 3
    Last Post: 04-10-2013, 01:18 PM
  6. Form(Combo Box) to Form Data Select (Access 2007)
    By split_atom18 in forum Access Programming / VBA / Macros
    Replies: 9
    Last Post: 05-19-2010, 05:17 PM
  7. Generate Email Using Access Form
    By Spac3Monkey in forum Access Tables & Databases
    Replies: 0
    Last Post: 08-13-2009, 05:36 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1