I am working on a task to save reports to files and then send in an email which has been working ok but I have a problem with the DoCmd.OutputTo command.
I have searched extensivley on the net and it seems that you cannot apply a filter to the DoCmd.OutputTo like you can when using DoCmd.OpenReport. So the workaround I am using is to still open the report via DoCmd.OpenReport but then use DoCmd.OutputTo referencing the current object. I have read resources that state if you leave the ObjectName as blank it references the current object i.e. my currently open report. This isn't working as I get an error "2487 - The Object Type argument for the action or method is blank or invalid."
Here is my syntax, am I doing something wrong or is it a limitaton in Access 2000?
DoCmd.OpenReport "Rep_SIQuery", acViewPreview, "Qy_SIQuery", "CallID = " & pubCallID
DoCmd.OutputTo acOutputReport, "", acFormatHTML, "C:\Transaction Dispute Log - " & Me.CallID & ".html", False
P.S. I get the same result when taking out the quotation marks for the ObjectName parameter in the DoCmd.OutputTo command.
I have searched extensivley on the net and it seems that you cannot apply a filter to the DoCmd.OutputTo like you can when using DoCmd.OpenReport. So the workaround I am using is to still open the report via DoCmd.OpenReport but then use DoCmd.OutputTo referencing the current object. I have read resources that state if you leave the ObjectName as blank it references the current object i.e. my currently open report. This isn't working as I get an error "2487 - The Object Type argument for the action or method is blank or invalid."
Here is my syntax, am I doing something wrong or is it a limitaton in Access 2000?
DoCmd.OpenReport "Rep_SIQuery", acViewPreview, "Qy_SIQuery", "CallID = " & pubCallID
DoCmd.OutputTo acOutputReport, "", acFormatHTML, "C:\Transaction Dispute Log - " & Me.CallID & ".html", False
P.S. I get the same result when taking out the quotation marks for the ObjectName parameter in the DoCmd.OutputTo command.