Thanks Michael for your help.
I tried it and it worked out perfectly.
But I was glad that another suggestion with SQL came, because it works much faster.