roymurray: it doesn't work that way.
SendObject is used to send a single database object by email.
To send more than one, you need to use a mail client or server that supports Automation.
If you use Outlook this is a sample of code:
Sub SendMultipleObjects()
Dim myOlApp
Dim myMailItem
'here is the code to save the objects as files
'so that they can be attached:
DoCmd.OutputTo acOutputReport, "Report1Name", acFormatXLS, "C:\Windows\Temp\Report1.xls"
DoCmd.OutputTo acOutputReport, "Report2Name", acFormatXLS, "C:\Windows\Temp\Report2.xls"
'and so on...You can have a loop here also
'now, set the object variables
Set myOlApp = CreateObject("Outlook.Application"

Set myMailItem = myOlApp.CreateItem(OlMailItem)
With myMailItem
'now fill in the recipients for the message
.To = "whoever@isp.com"
.CC = "Whoever.else@otherisp.com"
.BCC = "Hidden.Recipient@whocares.net"
'put something misleading here
.Subject = "Files you requested"
'blah blah blah part of thr message
.Body = "Hi John, Bye John, nice to see you but I'm out of here"
'add the files (you can use a loop here too
.Attachments.Add "C:\Windows\Temp\Report1.xls"
.Attachments.Add "C:\Windows\Temp\Report2.xls"
'ready, steady, GO..........
.Send
'get rid of the files.You already have them in the SentFolder
Kill "C:\Windows\Temp\Report1.xls"
Kill "C:\Windows\Temp\Report2.xls"
'and clean up, otherwise you'll blame me for low computer resources...
Set myMailItem=Nothing
MyOlApp.Close
Set MyOlApp=Nothing
End Sub
A mail server that supports automation: ArGoSoft from
Good luck.
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Daniel Vlas
Systems Consultant
danvlas@yahoo.com