D
DB_Guy11
I use several import routines on several databases, but lately I've noticed
that I'm losing the very first record/row when I use the import routines. If
I manually import the text file into a table using the same Spec used in the
import routine I get all of my records. The quick fix I'm using right now is
to go into each text file and add an blank space to the top row, but this is
becoming a bit tedious since there are so many. My guess is that the routine
is reading the first row as a header row and none of my text files have
header rows. Is there a way I can make my import routine pick up the first
record/row or do I have to chang my Import Spec and if so how? Below is one
of my import routines, if someone could just show what changes need to be
made I would highly appreciate it. Thanks in advance.
Option Compare Database
Function btnImportAllTAFTC()
Dim strfile As String
ChDir ("c:\TA FTC")
strfile = Dir("*.*")
Do While Len(strfile) > 0
DoCmd.TransferText acImportFixed, "FTC", _
"TA FTC", "c:\TA FTC\" & strfile, True
Kill "c:\TA FTC\" & strfile
strfile = Dir
Loop
End Function
that I'm losing the very first record/row when I use the import routines. If
I manually import the text file into a table using the same Spec used in the
import routine I get all of my records. The quick fix I'm using right now is
to go into each text file and add an blank space to the top row, but this is
becoming a bit tedious since there are so many. My guess is that the routine
is reading the first row as a header row and none of my text files have
header rows. Is there a way I can make my import routine pick up the first
record/row or do I have to chang my Import Spec and if so how? Below is one
of my import routines, if someone could just show what changes need to be
made I would highly appreciate it. Thanks in advance.
Option Compare Database
Function btnImportAllTAFTC()
Dim strfile As String
ChDir ("c:\TA FTC")
strfile = Dir("*.*")
Do While Len(strfile) > 0
DoCmd.TransferText acImportFixed, "FTC", _
"TA FTC", "c:\TA FTC\" & strfile, True
Kill "c:\TA FTC\" & strfile
strfile = Dir
Loop
End Function