Thank you very much @MajP!
Yes, it seems much simpler to me and above all I would have fewer problems in the future, in case, understanding because something doesn't work in the code.
I put your code in my "real" project (with real names, data etc) and it works fine.
Only, sorry, can I ask...