I am using SQL comands to query access and then return to excel.
In order to speed up I am creating a unique code i access, which is a concantennate of 2 fields. The problem is when I go to send to access I need to put quotes(") around the 2 columns I am using to query
If in excel my two columns lokk like this
Col A ColB
"AIC 110020"
"BBD 112525"
My query works
Of course the data looks lie this
AIC 110020
BBD 112525
I tried Dim variable as a string ad when I view it looks right with quotes but it still fails unless I go in and put A before " in column A, and after " in column B.
Can anyone let me know how I can alter the variable before I send toaccess.
In order to speed up I am creating a unique code i access, which is a concantennate of 2 fields. The problem is when I go to send to access I need to put quotes(") around the 2 columns I am using to query
If in excel my two columns lokk like this
Col A ColB
"AIC 110020"
"BBD 112525"
My query works
Of course the data looks lie this
AIC 110020
BBD 112525
I tried Dim variable as a string ad when I view it looks right with quotes but it still fails unless I go in and put A before " in column A, and after " in column B.
Can anyone let me know how I can alter the variable before I send toaccess.