i am importing using vb.. and it works fine except that field.. i dont want to change it.. is there a way to modify this?
ub Import_TD()
Dim i As Integer
With Application.FileSearch
.LookIn = "c:\Input Files\TD"
.SearchSubFolders = False
.FileName = "*.xls"
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" TD file(s) found."
DoCmd.SetWarnings False
For i = 1 To .FoundFiles.Count
' MsgBox .FoundFiles(i)
' Workbooks.Open Filename:=.FoundFiles(i)
DoCmd.TransferSpreadsheet acImport, 8, "TD_Input", .FoundFiles(i), True, ""
Next i
DoCmd.SetWarnings True
Else
MsgBox "There were no files found."
End If
End With
CurrentDb.Execute "Delete_empty lines_TD", dbFailOnError
' Delete empty lines and disable Error message
CurrentDb.Execute "TD_Append Query", dbFailOnError
'Append to working table
End Sub
is the import an append query or a make table query?
If you are running a make table query, Access defines the field types based upon the first bit of info to be inserted.