Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a report created from a quer

Status
Not open for further replies.

GillinghamFC

Programmer
Jan 28, 2002
18
GB
I have a report created from a query. Some clients want .rtf others may want .xls. I pass a variable "FileFormat" as a string from a table. The problem is the value is read as "acFormatRTF" not acFormatRTF. I have tryed Eval(FileFormat) but it still doesn't work.

Anyone have any ideas?

FileFormat is variable passed from a database table.

DoCmd.SendObject acSendReport, "DailyDealsAll", FileFormat, _
strToWhom, , , "Test Data", _
"", intSeeOutlook
 
Try setting the value of FileFormat to one of:
"Microsoft Excel (*.xls)"
or
"Rich Text Format (*.rtf)"

The acFormatRTF and acFormatXLS are just constants with the values of the text strings shown above.

Type:
Code:
? acFormatRTF
in the immediate window to see what I mean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top