Thanks a lot bebo021999 and zbor for the quick responses. Both solutions seem to work. I'll take a closer look to understand how they worked.
You saved me a lot of time and work...