Runtime 3270 error after upgrade to 2003

  • Thread starter Thread starter petebeatty
  • Start date Start date
P

petebeatty

Also posted in ExternalData forum

I just upgraded my XP Profressional Access to Access 2003. Now when I
attempt to run my application I get a Runtime error 3270 generated on a

transferspreadsheet command. No changes have been made to the
application. The only variable is the 2003 version of Access.

Can anyone provide some guidance on this??

I have opened an new spreadsheet using Excel 2003, and copied data form

an older spreadsheet into the new one. Once saved, this new file can
be read correctly

The command being used is:

DoCmd.TransferSpreadsheet acImport, , "ImpRoster",vrtSelectedItem, True
 
Right off-hand, I would suspect the value in vrtSelectedItem. Before the
TransferSpreadsheet command try

Debug.Print vrtSelectedItem

and see what shows up in the Immediate Window. Verify that it is the correct
path to the file.
 
That error is "The specified property cannot be found". It sounds like the
format or arguments of the TransferSpreadsheet function have changed. Try
looking up help on the function and see what it says the parameters should
be. Just hitting spacebar after the function name should bring up the
IntelliSense, which may point out to you what is wrong.
 
Well, the statement appears to be correct. The only thing I couldn't see in
what you typed was the value in the variable. You may want to try a
decompile or importing everything into a new database file and see if that
helps. To decompile, open the database with the following command line:

"<path>\msaccess.exe" "<path>\MyDatabase.mdb" /decompile

do a Compact and Repair, then open the code editor (Alt+F11) and go to
Debug|Compile MyDatabaseName.
 
I found the problem. It was not in the VBA code, it was a corrupted
..xls file. I do not know exactly what caused the error.
I copied the data in the .XLS to a new file and everything worked.

Thanks for the help
 
Back
Top