Access assigns a name to SendObject

B

Bill Johnson

Here's what's happening...
I have two forms that perform just about the same
function, they list the results of a query in continuous
format, with a command button to mail the results in a
formatted report. In one of the forms, the report is
attached to the email with the report name and given the
extention SNP (the chosen output format) in the other,
the attachment is with a generated name and XLS
(CDBB4.xls). The command line is identical in both:

DoCmd.SendObject acSendReport, stDocName,
acFormatSNP, msgTo, msgCC, msgBCC, msgSub, msgBod

The stDocName in each are just an access report.... the
reports both run perfectly, if you rename the XLS file to
SNP it opens and looks fine.

Okay, while I was working on this, I stumbled on what is
probably the answer. The report gets the name of what is
in the Caption property if that property has data. If the
Caption property has too many characters, then I guess
Access takes over and assigns a name and extention... does
this sound right? When I replaced the report caption
with a shorter string it worked.
 

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