Thanks Glenn.
I think i got it working now.