UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Using The Docmd To Send 2 Objects, Access 2003    
 
   
youngb
post Oct 21 2017, 11:08 AM
Post#1



Posts: 549
Joined: 2-September 03
From: Galway, Ireland


Hi,

I am currently using the docmd.SendObject to send a spreadsheet i.e.

CODE
        DoCmd.SendObject acSendQuery, stDocName, "Microsoft Excel(*.xls)", EmailAddress, , , "Confirmed Dates", MessageText


I now want to send 2 spreadsheets, is there a way I can use the SendObject without sending 2 emails or should I do it a different a way.

Thanks in advanced for any suggestions.

Brian
Go to the top of the page
 
theDBguy
post Oct 21 2017, 11:16 AM
Post#2


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


Hi Brian,

Unfortunately, SendObject can only send one object at a time. If creating a query to combine the data from the other two queries to send one attachment is not acceptable, then yes, you’ll have to do it another way.
Go to the top of the page
 
youngb
post Oct 21 2017, 11:44 AM
Post#3



Posts: 549
Joined: 2-September 03
From: Galway, Ireland


Hi DBGuy,

well yes, creating a temp table and append two queries is an option, so if you can only send one object at the time,
that is what I will do.

Thanks
Brian
Go to the top of the page
 
theDBguy
post Oct 21 2017, 11:53 AM
Post#4


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


Hi Brian,

You may not have to use a temp table and Append queries. You should be able to create a Select query to combine the data from the other queries.
Go to the top of the page
 
youngb
post Oct 21 2017, 11:57 AM
Post#5



Posts: 549
Joined: 2-September 03
From: Galway, Ireland


Hi DBGuy,

I could of course do that and it would not be difficult because they have the same fields but they want to separate the data by a few header lines.

Brian
Go to the top of the page
 
theDBguy
post Oct 21 2017, 12:15 PM
Post#6


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


Hi Brian,

See if you can use a UNION query then.

Hope it helps...
Go to the top of the page
 
youngb
post Oct 23 2017, 05:00 AM
Post#7



Posts: 549
Joined: 2-September 03
From: Galway, Ireland


Hi DBGuy,

yes you are right I could use a Union Query, I will see which works better and quicker.

Thanks
Brian
Go to the top of the page
 
theDBguy
post Oct 23 2017, 09:47 AM
Post#8


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


Hi Brian,

Let us know how it goes...
Go to the top of the page
 
youngb
post Nov 2 2017, 06:45 AM
Post#9



Posts: 549
Joined: 2-September 03
From: Galway, Ireland


Hi DBGuy,


I ended up using an append query to a temp table because it was taking data from three different places with different fields names but all going into the one temp table worked out easier and I think quicker for later use that a union query.

Thanks again for the help

Brian
Go to the top of the page
 
theDBguy
post Nov 2 2017, 10:15 AM
Post#10


Access Wiki and Forums Moderator
Posts: 73,276
Joined: 19-June 07
From: SunnySandyEggo


Hi Brian,

You're welcome. Good luck with your project.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    25th September 2018 - 04:33 PM