Thanks Andrew,
Gave that a try but I get stopped at 'vartype'. Says there's no vartype.prg
I had something similar in Access but FoxPro is quite different. I'm going to stick with FoxPro but in the meantime I'm fairly green in writing functions.
Thanks
Peter
Ask a question, risk being a fool for a moment. Don't ask the question be a fool for life. (unknown)