>(1) The first block of code you suggested will always fail because you are trying to look for the field name within the name of the file (not in the list of field names)'
>
>(2) The second block of code was not from me, but the problem is that it should say
>
>IF TYPE(ALIAS() + '.' + thh05) = "U"
>
>
>(3) It's not clear that you have tried my suggestion, using Field().
>
>
It should be
IF TYPE (alias() + '. thh05') = 'U'
ELSE
ENDIF
Note the '' in the TYPE check.
If it's not broken, fix it until it is.
My Blog