I am running Office 2010, and am having problems transferring a table to a spreadsheet.
The last bit of code looks like this
Dim SQLQuote As String
SQLQuote = Chr(34)
STRFILENAME = SQLQuote & STRFILENAME & SQLQuote
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "FOODBUY_XFER_FILE", STRFILENAME, True
The immediate window for the Debug.Print STRFILENAME looks like this:
The spreadsheet is never created.
However, if I cut and paste the debug results in place of the variable STRFILENAME, it works fine.