Well I have walked away from this, made a cup of coffee, come back with a fairly fresh pair of eyes and the code is now working as it should.
I have no idea why it wasnt working 10mins ago. But now its alive.
Thank you all for you help. Im sorry if I have caused some brain ache
Take care and keep up the good job!!