Emailing Unbound Report

sherlocked

Registered User.
Local time
Today, 13:59
Joined
Sep 22, 2014
Messages
125
Hello experts,

I have a report in my Access 2010 DB that that my users have requested the ability to email. The SendObject function sends a blank copy as there is no bound query behind this report (the fields are populated by sql statements), so I'm hoping to be able to program a button to take a screen shot and email that instead.

I have tried the "SendKey" option but this does not work. Are there any other ways? I have scoured the forums and Googled to no avail. Any info you can share will be greatly appreciated! :)
 
then you have done it wrong. The report MUST be bound to a query. The fields are bound to the query fields.
I email these all the time with SendObject. It works fine.
 
Print to pdf and email that?

Hello experts,

I have a report in my Access 2010 DB that that my users have requested the ability to email. The SendObject function sends a blank copy as there is no bound query behind this report (the fields are populated by sql statements), so I'm hoping to be able to program a button to take a screen shot and email that instead.

I have tried the "SendKey" option but this does not work. Are there any other ways? I have scoured the forums and Googled to no avail. Any info you can share will be greatly appreciated! :)
 
To further clarify, I am using VBA to populate unbound fields on my report. The sql language creates a value which is populated into a variable, and this variable fills the fields on my report. Therefore, there is no single query bound to the report, and the SendObject function does not work, nor will printing the report to .pdf and then emailing.

What I need to do is take a screen shot of the active report, then paste that into an email body and send an email.
 
That sounds to me like you're firing off one SQL statement per field on your report. If that is so, and you have any reasonable number of fields, it will surely take forever !
 
That is exactly what I'm doing. It takes approximately 30 to 45 seconds to open.

Any thoughts on how I can accomplish emailing this report?
 
You need to rethink the whole approach. As has already been said, the report should be bound to a query. Without knowing more about your database structure, nobody here will be able to help.
 
It would certainly be more efficient if the report could be bound, but I'm curious why it doesn't populate when sent or output. What event(s) is the code in that populates the report?
 

Users who are viewing this thread

Back
Top Bottom