Hello all,
I've been working to transition an access database to a new datasource. Previously, the inputs were copied and pasted from a query tool window in to an excel macro workbook, where the Unique ID's were treated as a "General" number, and the macro compiled all the results and saved them to a link file (linked table).
Now the inputs come as individual spreadsheets and the Unique ID's are treated as text. When the macro runs and compiles the data, my linked table now has a different (a text string) data type for my Unique ID's. The queries that try to join my main table, tblMain, to this linked table, tblSQLLink, now return: "Run-time error '3615': Type mismatch in expression".
How should I proceed? Use a query to rewrite the data types of my underlying Unique ID's in tblMain? Or use the Excel Macro Workbook to do some type of data conversion before saving the data to my linkfile? Which approach is the least likely to cause future bugs?
Below is code for one of my "import process" queries. Thanks for any suggestions!
I've been working to transition an access database to a new datasource. Previously, the inputs were copied and pasted from a query tool window in to an excel macro workbook, where the Unique ID's were treated as a "General" number, and the macro compiled all the results and saved them to a link file (linked table).
Now the inputs come as individual spreadsheets and the Unique ID's are treated as text. When the macro runs and compiles the data, my linked table now has a different (a text string) data type for my Unique ID's. The queries that try to join my main table, tblMain, to this linked table, tblSQLLink, now return: "Run-time error '3615': Type mismatch in expression".
How should I proceed? Use a query to rewrite the data types of my underlying Unique ID's in tblMain? Or use the Excel Macro Workbook to do some type of data conversion before saving the data to my linkfile? Which approach is the least likely to cause future bugs?
Below is code for one of my "import process" queries. Thanks for any suggestions!
Code:
SELECT tblMain.StatusID, tblMain.FirstName, tblMain.LastName, tblMain.Address1, tblMain.Error
FROM tblSQLLink INNER JOIN tblMain ON tblSQLLink.DBID = tblMain.ID
WHERE (((tblMain.StatusID)=1));