Hi. Did you try the last file I posted? If so, you'll see I didn't use that code. And as I also said in my last post, I don't think that code approach may not always work in some cases. For example, I deleted some records, and the code didn't work as expected anymore.