I am looking to export a few files into Excel from MS Access based on querying a table.
It's like this the query will be
select * from table where field = 0
I would like to loop the query till field is 9 and I want to save each result in a different name like field1, field2
How will this have to be modified?
strqry = "select * from table where field = 1"
DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, _
"strqry", _
"C:\Reports\Data_Analysis1.xls", _
True
Also how do I name the first sheet as field1 and in next loop field2