Results 1 to 4 of 4
  1. #1
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9

    Need to email object only - not whole database

    I am using the following code

    DoCmd.SendObject, (acSendForm, WorkRequestForm, acFormatPDF, sharonburton, , , WorkOrderRequest, True, , ,)

    But it is giving me a Compile Error, Expected Expression. What am I doing wrong?? Alternatively is there something else i can do to send an individual form not the whole database?

    Thank you

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    compare your code with this example

    DoCmd.SendObject acSendTable, "Employees", acFormatXLS, _
    "Nancy Davolio; Andrew Fuller", "Joan Weber", , _
    "Current Spreadsheet of Employees", , False


    found here

    https://msdn.microsoft.com/en-us/vba...-method-access

    you have additional comma's and brackets, missing quotation marks etc

  3. #3
    Shazz123 is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2017
    Posts
    9
    Thank you - i now have that working but i only want to send the current form I worked on - not all the ones in the database. How do i do this?

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    if the objects are per your original post, it should only be sending the form called 'WorkRequestForm'. If you have left this parameter blank, it will only send the current active object. So not sure how you are sending all the forms

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

Similar Threads

  1. Replies: 19
    Last Post: 10-21-2015, 10:37 PM
  2. Replies: 1
    Last Post: 07-01-2015, 04:18 AM
  3. Replies: 4
    Last Post: 06-27-2015, 07:01 PM
  4. Email Database Object
    By Meep in forum Access
    Replies: 3
    Last Post: 11-24-2012, 05:24 PM
  5. send email to email addresses in database?
    By cnstarz in forum Access
    Replies: 5
    Last Post: 03-02-2011, 09:46 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