Hi all,
I have having some trouble with the OutputTo method. I know I am missing the object name but not sure how to put it in. The correct syntax is
DoCmd.OutputTo objecttype[, objectname][, outputformat][, outputfile][, autostart][, templatefile]
and the code I have is
Private Sub Command29_Click()
DoCmd.OutputTo acOutputQuery, acFormatXLS, ["C:AgentStats.xls"]
End Sub
It seems like I have to give the query an object name and reference that within the syntax but again I am now sure how to do that.
The error message I get is as follows
MS Access can't find the field "C:\AgentStats.xls" referred to in your expression.
Any Help would be great.
durdle
________
volcano digital vaporizer
I have having some trouble with the OutputTo method. I know I am missing the object name but not sure how to put it in. The correct syntax is
DoCmd.OutputTo objecttype[, objectname][, outputformat][, outputfile][, autostart][, templatefile]
and the code I have is
Private Sub Command29_Click()
DoCmd.OutputTo acOutputQuery, acFormatXLS, ["C:AgentStats.xls"]
End Sub
It seems like I have to give the query an object name and reference that within the syntax but again I am now sure how to do that.
The error message I get is as follows
MS Access can't find the field "C:\AgentStats.xls" referred to in your expression.
Any Help would be great.
durdle
________
volcano digital vaporizer
Last edited: