I am a little unclear as to how you are executing your SQL query. The only experience I have using SQL in VBA is to interface to an Access database. This interface requires you to build your query as a text string, then submit it using an established connection. It has been a while since I've done that but the code would look something like this. You have to execute the VLOOKUP as a WorksheetFunction (there is no VLOOKUP function native to VBA) and take the result and incorporate that into your query. The way you have written it just uses the VLOOKUP formula as a string rather than actually calling it, so that's what you are going to get in your result.
I haven't built a reference application to test this out, but hopefully this gives us a basis for further discussion to find out what you really need:
Bookmarks