Originally Posted by
Kyle123
Without seeing the SQL it's impossible to say,
Well I have a number of different projects that make use of the function I am using for now and all of their SQL queries are different. The one thing in common is that they are all SELECT queries and they end with the WHERE criteria = ' (The VBA function repeatedly calls this query with each value in the array)
Originally Posted by
Kyle123
but can't you just use an in clause with all your criteria?
You mean write the SQL so it's like '...WHERE field IN ( 1d array )' ? I hadn't thought of that! Hmmm I would need to convert the array to a string first I guess... I'll play around with this idea and see what happens.
UPDATE: Perfect. Thank you very much Kyle. The speed increase turned out a lot better than I hoped for. The macros using the new function are now up to 15x faster! If anyone needs this, see my current WIP below. If you found this useful, please rep Kyle in the previous post!
Bookmarks