email query in excel - format error

  • Thread starter Thread starter Dave R.
  • Start date Start date
D

Dave R.

I am using the following code to create an email with an excel version of
query results attached:

DoCmd.SendObject acSendQuery, "1yr Follow-up-CHW", acFormatXLS, _
strToWhom, , , "CAASA Query ", _
, 1

but after opening the excel file, it says "File error. Some number formats
may have been lost."

If I use "DoCmd.Transferspreadsheet" and specify acSpreadsheetTypeExcel 7,
it saves a version on my disk with no format error message upon opening.



How can I change the above code so that I can email an Excel version of the
query without getting error messages upon opening?
 
In case you didn't realize, this is an Access VBA question. If you did
realize that, can you suggest a more specific microsoft.public forum where
there are Access experts who can help with VBA code to export a query?
 

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

Back
Top