[AccessD] OutputTo

Martin Caro mcaro at bigpond.net.au
Sun Aug 15 02:20:34 CDT 2004


Hi Folks

Just having some syntax issues with applying a filter to the query I'm using in the following:


stDocName = "qryLocations"
FilePath = "C:\temp\LocationReport.XLS" 
ExportFilter = Me.Filter


DoCmd.OutputTo acOutputQuery, stDocName, acFormatXLS, FilePath, True


I need to apply a filter string which I have in a global variable ExportFilter - I've tried setting the query filter property and inserting the filter into the DoCmd line but without success so far.

Any suggestions?

Martin 



More information about the AccessD mailing list