Can't import Excel data to linked table

R

rbm

I have an Excel spreadsheet file that I hope to use to
have others provide information to be imported into my
Access97 runtime program. It works grest EXCEPT that I
have to have the Excel file open when I run the import
script or it fails and I get a "Numeric Value Overload"
error message. If I have the Excel file open in the
backgroung it works fine.

I have also noticed that, since this is importing to the
backend database (linked tables) with the script being
initiated from the front end, if I try the same thing but
import into the same table copied into the front end
database, it works fine.

Is there a glitch with importing data using the
TransferSpreadsheet action if the tables are linked?

My import text is:
DoCmd.TransferSpreadsheet acImport,
acSpreadsheetTypeExcel97, "tblRegistration", varFileName,
True, "Registration"

where:
"tblRegistration" is the linked Access table (backend)

"varFileName" is the string value for the location of the
excel file to be imported (C:\Program
Files\Excel\file.xls)

"Registration" is the Named Range on the excel
spreadsheet with the data to be imported.

Thanks for anything you can suggest!
 

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