Exporting Recordset to Spreadsheet

后端 未结 3 1850
醉梦人生
醉梦人生 2020-12-20 21:28

Just getting to grips some VBA (this stuff\'s new to me so bear with us!)

From query ContactDetails_SurveySoftOutcomes, I\'m trying to first find a

3条回答
  •  [愿得一人]
    2020-12-20 22:07

    DoCmd.TransferSpreadsheet expects its third parameter to be a String (variable or literal) specifying the name of a table or query. So, instead of opening a DAO.Recordset you could create a DAO.QueryDef named something like "forExportToExcel" with the same SQL code, then use that name in the TransferSpreadsheet call.

提交回复
热议问题