Sorry, I did not look close enough the first time. You are looking for code to change the data source in a query. I don't have any experience in doing queries and would need to do research to get the answer. Maybe someone with more expertise in that area will pick up on the thread and provide you a quick answer. I am pretty sure it is fairly simple, but as I said, it is not an area I am familiar with.
Regards, JLG