Results 1 to 7 of 7
  1. #1
    messier is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    18

    EMailDatabaseObject

    Hi there, i have been using EMailDatabaseObject for a long time now. however, i realized it wont work if my dataset exceeds 65K. how do i still use this?



    1. can i somhow use this function "
    EMailDatabaseObject" but allow me to output exceeding 65K?

    2. otherwise, can i have a vba that allows me to send email attaching 2 files after i perfrom an EXPORT step which allows for 65K records?

    Thank you!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    The limit should be with your email service.
    did you try
    docmd.SendObject acSendReport ,"rMyReport",acFormatPDF,sTo,,,sSubj,sBody
    or
    docmd.SendObject acSendQuery ,"qsMyQuery",acFormatXLS,sTo,,,sSubj,sBody

  3. #3
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    There is a limit of 64K records on a direct excel export.
    if you use DoCmd.TransferSpreadsheet to perform the export to a file then add that as an attachment it doesn't have that limitation.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    messier is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    18
    i want to use this method. but. how do i save into a dynamic file name? C:\File - DDMMYYYY.xlsx ????

    what to i fill in the box below?
    Click image for larger version. 

Name:	xxx.png 
Views:	11 
Size:	68.8 KB 
ID:	45230

  5. #5
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    I don't use macro's but the expression would be something like

    = "C:\File - " & Format(Date() , "ddmmyyyy") & ".xlsx"

    The & is concatenating the various parts of the string
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  6. #6
    messier is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    18
    Thanks Minty! Tried this and it works! (Note: Date() should be replaced with Now())

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,859
    Quote Originally Posted by messier View Post
    Thanks Minty! Tried this and it works! (Note: Date() should be replaced with Now())
    Not really, as you are only formatting as ddmmyyyy so no time element involved.?
    If you did need that, then yes Now() would be better to use.?

    So NO, no need for Date() to be replaced by Now() from what you were asking?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. EMailDatabaseObject
    By fishhead in forum Macros
    Replies: 3
    Last Post: 04-03-2020, 12:10 PM
  2. EmailDatabaseObject
    By mick3911 in forum Macros
    Replies: 3
    Last Post: 08-07-2018, 04:03 PM
  3. EmailDatabaseObject Help
    By jimaccessnovice in forum Macros
    Replies: 4
    Last Post: 02-27-2018, 04:51 PM
  4. emaildatabaseobject with date?
    By vicsaccess in forum Import/Export Data
    Replies: 5
    Last Post: 10-19-2015, 05:55 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