Hi, rjwrees,

weŽd love to help but sadly you missed to wrap your code in code-tags as requested in the forum rules. WeŽd be glad to help if you do so.

Ciao,
Holger