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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferText importing problem in Access 2000, not in 97 1

Status
Not open for further replies.

lgbatdw

Programmer
Aug 11, 2004
44
US
I have converted an Access 97 database (front and backend)up to 2000. There is a function to import a file that was exported from another vendor's payroll database. Importing works fine in 97 but I always get the error in 2000 "Cannot update. Database or object is read-only." THis can't be true since the '97 version works perfectly. Same code importing same file from same location and I have tried it on my local drive with same results - works in '97, doesn't in 2000. It uses a saved import spec and this is the line of code:

DoCmd.TransferText,acImportDelim, "PCPayrollChecks",_
"ImportChecks", "N:\pr\w00-ck.rpt"

An interesting note: If I open the file to be imported (w00-ck.rpt)in Wordpad and do Save As w00-ck.CSV (.csv extension instead of .rpt), it works in 2000. However, this is not the solution, since the payroll database software is from another vendor and no control on the file export.

I could sure use HELP.

Linda in MN
 
This is not a bug this is an intended security feature of Access!
Basically Access will only let you import from a fixed list of file extensions "txt", "csv", "tab", "asc", "htm" and "html".
You basically have 2 choices. Rename the file just before you import it into your database or add the required extension to the registry at
Code:
HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\Text\DisabledExtensions
Just rememeber that you will need to do this on every machine you run it on.

hth

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
Want to get great answers to your Tek-Tips questions? Have a look at F
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top