Hi All,
I am getting a Type Conversion Failure. I know WHY I'm getting it, I just think it's stupid and need a convenient work around.
I am running DoCmd.TransferSpreadsheet command in VBA through Access to import an Excel file into an existing database. One of the columns in Excel is a data type General (I would like to leave it this way for various reasons) that can hold blanks, numbers, or text. The accompanying column in the Access database is of type Text, as that is how I want all of the information stored. When the import occurs Access finds the first record with a value in the Excel column and choose that as the data type. In this case the first row with a value it sees has a number and expects all values in that column to be a number - Then I get the Type Conversion Failure when it reaches rows that have Text in this column.
Please help, it is used for automation so I really can't be opening each Excel file up to convert the column to Text (which does work). Is there any other solution you ladies and gents can think of?
I am getting a Type Conversion Failure. I know WHY I'm getting it, I just think it's stupid and need a convenient work around.
I am running DoCmd.TransferSpreadsheet command in VBA through Access to import an Excel file into an existing database. One of the columns in Excel is a data type General (I would like to leave it this way for various reasons) that can hold blanks, numbers, or text. The accompanying column in the Access database is of type Text, as that is how I want all of the information stored. When the import occurs Access finds the first record with a value in the Excel column and choose that as the data type. In this case the first row with a value it sees has a number and expects all values in that column to be a number - Then I get the Type Conversion Failure when it reaches rows that have Text in this column.
Please help, it is used for automation so I really can't be opening each Excel file up to convert the column to Text (which does work). Is there any other solution you ladies and gents can think of?