Query being deleted after DoCmd.SendObject

T

Tomac1

Hi,

I have a form with buttons that trigger the sending of a query (via e-
mail) in acFormatXLS. Here is the code:

DoCmd.SendObject acSendQuery, "MyQuery", acFormatXLS,
strRecipients, , , "Report: " & Format(Date, "MM/DD/YY"), , -1

This triggers an e-mail window to open in Outlook (as expected). If I
close the window before sending, and go back to the form and click the
button again, it fails due to the query being deleted !

The query is written in SQL and when I go to look at it, it is simply:
SELECT; ...instead of what it was. Any clues to why this is happening
would be appreciated. Thanks,

CT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top