I am trying to export some data to Excel using some code I found:
Private Sub cmdExcelExport_Click()
Dim strXL_Location As String
Dim cdb As DAO.Database, qdf As DAO.QueryDef
Const tempTableName = "_tempTbl"
Set cdb = CurrentDb
strXL_Location = "X:\Access...