TransferSpreadsheet acExport Character Limit?????

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following line of VBA to transfer an Access table to an Excel
workbook off of a command button on a form:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3,
"tblFacComplianceByAuditType", strInitialFileName, True

It works well until the string "strInitialFileName" extends beyond a certain
character length (see e.gs below). At that point, I get an error message
indicating that the object tblFacComplianceByAuditType cannot be found etc...

I am at a loss. Any input/suggestions would be greatly appreciated. Thanks.

Works:
P:\Field Audits\FAT\FAT Development\Facility Compliance Ohio Region.xls
P:\Field Audits\FAT\FAT Development\Facility Compliance Wisconsin.xls
P:\Field Audits\FAT\FAT Development\Facility Compliance WisconsinA.xls
P:\Field Audits\FAT\FAT Development\Facility Compliance WisconsinAB.xls

Does not work:

P:\Field Audits\FAT\FAT Development\Facility Compliance WisconsinABC.xls
P:\Field Audits\FAT\FAT Development\Facility Compliance Wisconsin Minn.xls
P:\Field Audits\FAT\FAT Development\Facility Compliance Wisconsin
Minnesota.xls
P:\Field Audits\FAT\FAT Development\Facility Compliance Kentucky Indiana
Operations.xls
 
Back
Top