Reputation: 37
I would like to import a spreadsheet to an access database, on column has ages 1-89 plus another that's says 90+ which in turn create a Import Error. Using the DoCmd.TransferText, is it possible to import everything as it is including 90+ in the column of all other numbers?
Upvotes: 1
Views: 615
Reputation: 66
If you import data into a table that doesn't already exist, Access will create one for you. It automatically determines the data type of each column based on the first few rows that are imported. If your source data contains a mixture of data types in one column, then you may experience this error.
There are 2 solutions:
"20"
instead of 20
(in Excel, format the cell as Text, so it is left aligned or start cell contents with an apostrophe '20
or use formulaic notation ="20"
).You could do either of those things, but it would be better to do both of them if possible.
Upvotes: 1