Issue with DoCmd TransferText (1 Viewer)

BrianFawcett

Registered User.
Local time
Today, 06:08
Joined
May 3, 2010
Messages
63
I have a button on a form which has code to delete and table and then import that same table from a network folder. When I run the job I get an error telling me "The text file specification does not exist." But it does.

Here is my code:

DoCmd.TransferText acImportDelim, "ImportOLMData", "BacklogDataTable", "C:\Documents and Settings\bfawcett\Desktop\Business Analyst - Brian Fawcett\Development\Leasing\o3916021.csv"

Does anyone know what might be wrong?
 

GinaWhipp

AWF VIP
Local time
Today, 09:08
Joined
Jun 21, 2011
Messages
5,899
I would try going thru it manually and making sure it is showing up on the list the same way you typed it because there appears to be nothing wrong with your line.
 

BrianFawcett

Registered User.
Local time
Today, 06:08
Joined
May 3, 2010
Messages
63
GinaWhipp, I have done it manually. I even copied and pasted the text from the Import Spec name into the VBA code, and it still gives me the error. I am stumped as to why.
 

GinaWhipp

AWF VIP
Local time
Today, 09:08
Joined
Jun 21, 2011
Messages
5,899
Well, my only suggestion would be to recreate it with a new name. Seems it must think it's not there or not for text...
 

GohDiamond

"Access- Imagineer that!"
Local time
Today, 09:08
Joined
Nov 1, 2006
Messages
550
"ImportOLMData" is the text file specification in your example; I've had occasion where these things become corrupt, recreate the SPEC and override it or rename it with a 2 and fix the VB code to match...

just a suggestion...

Cheers!
Goh
 

Users who are viewing this thread

Top Bottom