Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferSpreadsheet method in Access 97 and 2000

Status
Not open for further replies.

PaulCoop

Programmer
Apr 3, 2001
31
GB
My office has both Access 97 and Access 2000. The Database in question was developed in 97 and works fine on systems using Access 2000. I have writen a import process to import Excel 97 files that comes from an external company. The import code line is as follows:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "DATA TRANSFER", txt_file.Value, True

This work fine when used in Access 97 but fails to import anything when used in 2000. No error message is produced. The constant acSpreadaheetTypeExcel97, though not one listed in the help files, is recognised as the number 8 which is the correct type so this can not be the reason.

The only way around it appears to be to save the file as Excel 5.0 and import it using the relevant type constant. This works but I do not wish to add to the procedures here in the office the additional step of resaving the Excel documents as an earlier version (there is enough for people to know already).

Is this a known bug? Is there a solution to such a problem? Are there any additional restrictions placed on the data when importing using 2000 rather than 97 causing it to reject all the data?

Any help here would be appreciated.

Paul Cooper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top