Im integrated a metrologic scanpal batch barcode scanner into my application, the scanner drops a csv into my application directory, the text file is as follows.
My Text File
9794022121256032,4
9794022121256032,9
9794022121256032,3
9794022121256032,5
I then use the following sub to import the text into a table
My Table then contains 2 numeric fields
9.79402212125603E+15 4
9.79402212125603E+15 9
9.79402212125603E+15 3
9.79402212125603E+15 5
I need the first field to import as text, can anybody help?
Thanks in Advance
My Text File
9794022121256032,4
9794022121256032,9
9794022121256032,3
9794022121256032,5
I then use the following sub to import the text into a table
Code:
Sub Import_DataCap()
Dim strFilter2 As String
Dim strStartDir As String
Dim varFileName As Variant
'Set filter for file dialog
strFilter2 = "Text (*.CSV)" & vbNullChar & "*.CSV" _
& vbNullChar & "All Files (*.*)" & vbNullChar & "*.*"
' Set default directory to look in
strStartDir = "C:\"
'get file path
varFileName = "c:\program files\my file location\DataCap\Import.txt"
DoCmd.TransferText acImportDelim, "", "tblImportTable", varFileName, False, ""
End Sub
My Table then contains 2 numeric fields
9.79402212125603E+15 4
9.79402212125603E+15 9
9.79402212125603E+15 3
9.79402212125603E+15 5
I need the first field to import as text, can anybody help?
Thanks in Advance