In further testing, I see that using the code in post #16 is less efficient than using the code in post #9. The code in post #16 runs three additional queries as compared to the code in post #9.
I don't see how that is possible (unless I looked at the wrong post). Would you be willing to show both ways with query counts and I'll try and figure out what happened?