Transfertext Method

angel007

New member
Local time
Today, 13:06
Joined
Jun 5, 2012
Messages
6
Hi,​
I need some help with Transfertext Method…. When I run my vbscript code it inserts empty rows instead of data..:(
 ​
Please can anyone look into this and let me know what I’m doing wrong…​
Code:
[/INDENT][INDENT]A.DoCmd.TransferText acImportFixed, "Spec name", "test", "C:\\test.txt"

Thank you!
 
According to this site, your syntax appears correct if you ignore the A. What does that represent. Is it integral to your code?
 
Hi,

My bad!

Here is my complete code...

Code:
Dim A  
 Set A = CreateObject("Access.Application")  
A.OpenCurrentDatabase ("C:\test.mdb")  
A.DoCmd.TransferText acImportFixed, "Spec name", "test", "C:\\test.txt"
Set A = Nothing 
msgbox "Done!"

Thank You!
 
So is that a completely different database than the one that the code is in? Also, is the Import Spec actually inside of C:\Test.mdb? And third, your file path is wrong as there shouldn't be two backspaces for "C:\test.txt"
 

Users who are viewing this thread

Back
Top Bottom