J
Joe
i am using the TransferText method to import a text file into a table.
when importing the data, one field is converted into currentcy, even
though it is declared as a string.
' Declare Variables.
Dim stStudentID, stImport, stTable As String
Dim stMAAddr1, stMAAddr2, stMAAddr3, stMACity, stMAState,
stMAPostCode, stMACountry As String
' Dump All Records to Temorary Database.
stImport = stPath & "IMPORT\address_file.txt"
stTable = "tmp_ADDRESS"
DoCmd.TransferText , , stTable, stImport, 1
Here is an example of the text file. The first field is converted into
currency, or an error is thrown because of a type conversion. currently
there are no text qualifiers for the fields.
STAFF_ID,MAaddr1,MAaddr2,MAaddr3,MAcity,MAstate,MApostcode,MAcounty
961132B,123 Main Street,,,WASHINGTON,VIC,3000,
843040B,229 Baker Street,,,OHIO,VIC,3095,
S001900,111 Minor Street,,,FLORIDA,,3200,
joe.
when importing the data, one field is converted into currentcy, even
though it is declared as a string.
' Declare Variables.
Dim stStudentID, stImport, stTable As String
Dim stMAAddr1, stMAAddr2, stMAAddr3, stMACity, stMAState,
stMAPostCode, stMACountry As String
' Dump All Records to Temorary Database.
stImport = stPath & "IMPORT\address_file.txt"
stTable = "tmp_ADDRESS"
DoCmd.TransferText , , stTable, stImport, 1
Here is an example of the text file. The first field is converted into
currency, or an error is thrown because of a type conversion. currently
there are no text qualifiers for the fields.
STAFF_ID,MAaddr1,MAaddr2,MAaddr3,MAcity,MAstate,MApostcode,MAcounty
961132B,123 Main Street,,,WASHINGTON,VIC,3000,
843040B,229 Baker Street,,,OHIO,VIC,3095,
S001900,111 Minor Street,,,FLORIDA,,3200,
joe.