Hi dear all, I have piece of code which is about to export different query into multiple worksheets in one excel file. Queries are made from distinct value of one recordset, I cam get the first loop successfully, but when it move to the second recordset, the result I got is the sum of two queries. I am pretty new on built the recordset and don't know what caused the problem in my code, I hope some of you genuis can have a look at my code here, Thanks a lot!
Code: