What does any of that have to do with taking an access query which uses a function to produce one of its resultant fields and building an access table which contains the data in that field?

As all of your code refers to "Document" you must be in a Word project. We have already established that since the Access querry is using a function, then it can't be done in the method you propose.