I am importing two spreadsheets into access for comparison. I am using this to import the spreadsheets as I do not know how many columns the workbook will have.
Sometimes the workbook will have 20 columns of data, while others it has 8. The only thing that is constant is the column headers that exist in the workbook.
The issue I face is when comparing the two tables, table1.userID will import as a short text, but table2.userID will import as an int so the query fails since they are different data types that I am trying to join on.
What would be my best way to combat this?
Code:
DoCmd.TransferSpreadsheet
Sometimes the workbook will have 20 columns of data, while others it has 8. The only thing that is constant is the column headers that exist in the workbook.
The issue I face is when comparing the two tables, table1.userID will import as a short text, but table2.userID will import as an int so the query fails since they are different data types that I am trying to join on.
What would be my best way to combat this?