Hi spot on script was just about to try wiritng the same but am new to the MLQ language so was a bit daunted having only programmed in Fortran IV and Basic and used compilers some 35 years ago. Thanks for the help really appreciate it.