I am trying to run a query here and have it output to a file on my network. The error that pops up is 3011 saying that it can't find the object "select * from..." I am sure i have something incorrect on the outputto command.
Code: Select all
strWhere = "IN (""AL"",""AK"",""AZ"")"
strLoc = "O:\CSDB\REPORTS\SalesReports\custbystate.xls"
sQuery = "select * from [qCustomerByState] where [STATE_24] " & strWhere
DoCmd.OutputTo acOutputQuery, sQuery, acFormatXLS, strLoc
Mark