Hi guys!
I am facing a really weird problem.
I am using this code:
in order to import some columns from an excel worksheet to a table from my Access DB.
The problem is that the code works perfectly if the table TBL_ALL_EMPL_DATA is local but if I link it from the backend it doesn't work anymore throwing the following error:
To give you a more clear overview, in the past I was using something like this:
in order to do the same thing but joining 2 excel files. This version works even with linked table but now I need to remove from the query the second excel file and keep only the first one.
Do you have any clue why, if I am removing from the query the INENR JOIN clause, the query doesn't work anymore on linked table?
Thanks a lot for your support!
Cheers,
Adrian
I am facing a really weird problem.
I am using this code:
SQL:
.RunSQL "INSERT INTO TBL_ALL_EMPL_DATA (" & tableFields & ") " & _
"SELECT " & inputReportFields & " " & _
"FROM [Excel 12.0 Xml;HDR=YES;DATABASE=" & inputReportPath & "].[WorksheetName$]"
The problem is that the code works perfectly if the table TBL_ALL_EMPL_DATA is local but if I link it from the backend it doesn't work anymore throwing the following error:
To give you a more clear overview, in the past I was using something like this:
SQL:
.RunSQL "INSERT INTO TBL_ALL_EMPL_DATA (" & tableFields & ") " & _
"SELECT " & inputReportFields & " " & _
"FROM [Excel 12.0 Xml;HDR=Yes;Database=" & inputReportPath & "].[WorkheetName$] MR " & _
"INNER JOIN [Excel 12.0 Xml;HDR=Yes;Database=" & inputReport2Path & "].[WorksheetName2$] OS " & _
"ON OS.[ColumnA] = MR.[ColumnA]"
in order to do the same thing but joining 2 excel files. This version works even with linked table but now I need to remove from the query the second excel file and keep only the first one.
Do you have any clue why, if I am removing from the query the INENR JOIN clause, the query doesn't work anymore on linked table?
Thanks a lot for your support!
Cheers,
Adrian