Results 1 to 3 of 3
  1. #1
    ajh19742000 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    5

    Emailing a record from an Access form

    Hello,
    I am creating a database where I can add data in a form which is working fine. What I would like to achieve is have a button on the form which creates an email with the report as a pdf with just the current record on view (not all data) and the fields within the table as part of the email in the subject field and the main text of the email. I have created the report within Access but having difficulty with the code to achieve this. I have seen various methods online but all seem to have compiling errors with the VB windows.


    Any help appreciated
    Thanks

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    I have seen various methods online but all seem to have compiling errors with the VB windows.
    no point in providing yet another variation which will no doubt also create compile errors since we don't know your setup. Suggest provide one of the examples you have tried and tell us the compile error(s).

    Or take a look at the bottom of this thread where the same question has been asked several times

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,121
    Look into Docmd.SendObject method: https://docs.microsoft.com/en-us/off...cmd.sendobject
    You will need to limit the report's record source to the current record displayed on the form by adding a reference to the record's unique ID:

    Code:
    SELECT * FROM qryReportRecordSource WHERE RecordID = Forms!frmYourForm!RecordID
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Emailing record attachments
    By sparkyinak in forum Access
    Replies: 1
    Last Post: 03-21-2019, 04:42 PM
  2. Replies: 3
    Last Post: 08-18-2015, 05:19 AM
  3. Emailing one Record
    By GGCR in forum Import/Export Data
    Replies: 6
    Last Post: 01-20-2014, 09:06 AM
  4. Emailing Just ONE Record
    By HLTAYLOR in forum Misc
    Replies: 8
    Last Post: 06-26-2013, 12:34 PM
  5. Replies: 2
    Last Post: 08-02-2011, 07:25 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