>>This is the best. But make it LOCAL so in case you have defined variable beforehand you didn't spoil its value, also in all cases check if you didn't use the same variable in the same routine.
>
>I don't think that I used the variable elsewhere, but I will look and see if perhaps I did.
Just put:
SET ASSERTS ON
ASSERT TYPE([aPatFiles]) # [U]
before ADIR()
and when it stops DEBUG where you use it :-) (see, I didn't use IF :-)))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.