- add Debug.Print strSql before you try to execute
- add a break point in the code, run it and step through with F8
- when strSql is printed in the immediate window, examine it and fix any problem with it by editing your code. Can also copy/paste output to a new query in sql view and attempt to switch to datasheet view. If it balks, it usually highlights the problem part. I imagine the issue is what strColumns contains.
- and please use code tags (# on forum posting toolbar) with proper code indentation for easier reading.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.