I want to export 5 queries to one workbook. For example, I want qryMaster to go to a worksheet called Master, qryOne to go to a worksheet called One, qryTwo to go to a worksheet called two etc etc
I always use this to export a query result to excel - is this able to be altered to accomplish my above desired result or do i need to go a different route?
Code:Dim qrySQL As String Dim qdf As QueryDef qrySQL = "SELECT ......;" Set qdf = CurrentDb.CreateQueryDef("qryTest", qrySQL ) DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "qryTest", CurrentProject.Path & "\Test.xlsx", True