Thanks Haseeb,
I went with the first code and it worked perfectly!.
Thanks very much.