Hi All
I have to export various files which are queries to a single excel workbook.
I am using the code below (which I haven't been able to test - which is why I am here!)
Public Function ExportTblToExcel()
strFullPath = "C:\Users\Paul\Documents\FFP\Data Exports\QuarterlyDataExports.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryAttendancesUNION", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXP12WeekProgAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPFFPDataCore", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPMentoringAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPPathwayAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPPrepPathwayAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
End Function
Aside from not knowing if I have the correct code - I can't seem to work out how to add a Button Control on a form to run (or attempt to run) the code..
Any help at all would be greatly appreciated!
Cheers
Paul
I have to export various files which are queries to a single excel workbook.
I am using the code below (which I haven't been able to test - which is why I am here!)
Public Function ExportTblToExcel()
strFullPath = "C:\Users\Paul\Documents\FFP\Data Exports\QuarterlyDataExports.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryAttendancesUNION", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXP12WeekProgAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPFFPDataCore", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPMentoringAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPPathwayAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryEXPPrepPathwayAttendance", "ExcelWorkbook(*.xlsx)", False, "", , acExportQualityPrint
End Function
Aside from not knowing if I have the correct code - I can't seem to work out how to add a Button Control on a form to run (or attempt to run) the code..
Any help at all would be greatly appreciated!
Cheers
Paul