R
Rafi
I an appneding records to an Access table from an Excel file where the data
in the Zip Code column is not consistent; some is numeric while others are
text. The corresponding field in Access is defined as a text field. My
problem is that tthe resulting records have a null value for Zip Code for
those records that were formated as numeric in Excel. My code is listed
below. How can I make sure the data is converted to text and appended to my
table?
Thx.
stSQL = "INSERT INTO TblRecords( CoName, [Address 1], [Address 2], City, " _
& "State, [Postal Code], [Postal Code Plus Four], " _
& "Account, Segment) " _
& "SELECT DHL.Name, DHL.[Address 1], DHL.[Address 2], " _
& "DHL.City, DHL.State, Format(DHL.[Postal Code],""00000"")," _
& "DHL.[Postal Code Plus Four], " _
& "DHL.Account,""" & stSeg & """" _
& " FROM DHL;"
in the Zip Code column is not consistent; some is numeric while others are
text. The corresponding field in Access is defined as a text field. My
problem is that tthe resulting records have a null value for Zip Code for
those records that were formated as numeric in Excel. My code is listed
below. How can I make sure the data is converted to text and appended to my
table?
Thx.
stSQL = "INSERT INTO TblRecords( CoName, [Address 1], [Address 2], City, " _
& "State, [Postal Code], [Postal Code Plus Four], " _
& "Account, Segment) " _
& "SELECT DHL.Name, DHL.[Address 1], DHL.[Address 2], " _
& "DHL.City, DHL.State, Format(DHL.[Postal Code],""00000"")," _
& "DHL.[Postal Code Plus Four], " _
& "DHL.Account,""" & stSeg & """" _
& " FROM DHL;"