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

TransferText Action in Macro

Status
Not open for further replies.

FCCC

Technical User
Mar 14, 2002
104
US
Hi All,

I was trying to make a macro to import data from a text file into an access table but I keep getting the following error:
"The Microsoft Jet Database engine cannot open the file. It is already opened exclusively by another user, or you need permission to view its data".

It is not true though because there is no other user and the file is not open.

I tried to export the file into excel and create a macro using TransferSpreadsheet to import the file and it works fine.

I don't want to use excel file though because it will be a two step process for the user. Any ideas???

Any help will be very much appreciated.
 
FCCC:

I've been playing around with using the transfertext method in a macro to import a text file and the only way I could duplicate your problem was when I opened the text file in Word and then tried to import it.

What process are you using to create the text file? It may be that the process that is creating the text file is not releasing the file once it is complete. You might want to check your process to be sure that it is finishing and closing before you try to import the file.

[flush]

[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
Hi DBAMJA,

The text file was created manually, it is my list of subcontractors. It is not a part of my macro. I will try if .doc will work.

Thanks for the input.
 
Well, .doc didn't work. I got "Cannot Update. Database object os read-only." I think it has to do with the "Specification Name" field. I don't know what to enter here.
 
What is the source for your subcontractors text file? Is it another database, excel file or something else? Knowing this might help figure out what is going on.



[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
sql file. Imported them in a text file so I could manipulate them.
 
It seems that the process that is creating the text file is not quitting and allowing other processes to use the file. I'll keep thinking about it but for right now I have no ideas.

[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
thanks, I will keep on trying too. I will post any progress I will have. Thanks for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top