Following is part of the code I am using to import data from spreadsheets into my database.
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel97, _
"SiteData", "C:\BOSlink" & "\OldDataFiles\" & sExcelFileName, False, _
sShortFileName & "!"
When I try it with most spreadsheets I get output that looks like the following in the immediate window in response to the debug,print commands and the code works perfectly:
However when I tried it with the latest series of spreadsheets that have arrived I get the following output from the debug.prints which looks right
The transfer function then trips out with an error that says:
's190715s$' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
Where did the $ sign come from? Can anyone help me figure out why/how this is happening?