Dim stDocName As String stDocName = "qry_tblTempXa_View_y" DoCmd.OutputTo acOutputQuery, stDocName, acFormatXLS, " .xls", True
http://www.sql.ru/forum/1076943/programmnyy-eksport-v-excel-oshibka-ili-ocherednoy-gluk-access