Re: Using SendObject with a Combo Box choice

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Brian in FT W. wrote:
> Still not getting it to work. From my interpretation of what you
> said, I have a queried list of labs (files) in a combo box that I
> would like to send. From the Combo Box, I select the lab (file) I
> would like to send information on. After I select the appropriate lab
> name, I want an email to be sent containing an Excel file that has
> information on that lab. What type of macro do I write to get it to
> send the information? I really appreciate all the help!

Your original post implied that you would know what code to write if you
were using a command button. Is that correct?

The terms "labs" and "files" mean nothing to me. I assumed that what you
need to send are reports. It now sounds like what you want to send are
queries. Is that correct?

Generically one would send a saved query object as an Excel file with...

DoCmd.SendObject acSendQuery, "QueryName", acFormatXLS, "Recipient",,,
"Subject", "Message", True

To grab the name of the query from the ComboBox would be...

DoCmd.SendObject acSendQuery, Me.ComboBoxName, acFormatXLS,
"Recipient",,,"Subject","Message",True

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


.