AAAAGGGGHHHHHH!!!!! Sorry just had to vent a little. I cannot for the life of me figure this out. I'm trying to import programmatically 2 text files and append them. Here is my code:
DoCmd.TransferText acImportDelim, "nwkadjcl2 Import Specification", "nwkadjcl", "c:\switchdata\laf\nwkadjcl2.txt", False, ""
DoCmd.TransferText acImportDelim, "Append nwkadjcl2 Import Specification", _
"nwkadjcl", "c:\switchdata\alex\nwkadjcl2.txt", False, ""
The 1st one imports text file nwkadjcl2 into table nwkadjcl just fine. When the 2nd imports (FROM A DIFFERENT PATHNAME!!!!) and appends to table nwkadjcl it just doubles the data in nwkadjcl. It behaves like I imported the exact same file from the exact same pathname. Granted they share the same text filename but the data in each is totally different and the pathname is different as well. Also, I'm using 2 seperate import specifications.
If I manually import 1st file and then the 2nd one, it appends the 2 files correctly.
This one blows me away. If anyone can figure this one out then you are the ultimate Access guru. Either that or I missed something totally simple and I should quit this job and do something easier on the brain, maybe a human guinnea pig for some drug company. This is Access 97 by the way. Thanks for any help.
[This message has been edited by Mendel (edited 01-03-2002).]
DoCmd.TransferText acImportDelim, "nwkadjcl2 Import Specification", "nwkadjcl", "c:\switchdata\laf\nwkadjcl2.txt", False, ""
DoCmd.TransferText acImportDelim, "Append nwkadjcl2 Import Specification", _
"nwkadjcl", "c:\switchdata\alex\nwkadjcl2.txt", False, ""
The 1st one imports text file nwkadjcl2 into table nwkadjcl just fine. When the 2nd imports (FROM A DIFFERENT PATHNAME!!!!) and appends to table nwkadjcl it just doubles the data in nwkadjcl. It behaves like I imported the exact same file from the exact same pathname. Granted they share the same text filename but the data in each is totally different and the pathname is different as well. Also, I'm using 2 seperate import specifications.
If I manually import 1st file and then the 2nd one, it appends the 2 files correctly.
This one blows me away. If anyone can figure this one out then you are the ultimate Access guru. Either that or I missed something totally simple and I should quit this job and do something easier on the brain, maybe a human guinnea pig for some drug company. This is Access 97 by the way. Thanks for any help.
[This message has been edited by Mendel (edited 01-03-2002).]