TransferSpreadsheet acExport Character Limit?????

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top