To avoid such problem, always use TYPE() function to check if variable/property/field exists. To check type of existing variable you can use TYPE() or VARTYPE() function.
>Can anyone tell me how the following line of code could possible throw an error:
>
>IF VARTYPE(mdepartment) <> "U"
>
>We get a "Variable mdepartment not found" error.
>
>Well, duh, that is what we are checking. Why is this throwing a runtime error? I have seen VARTYPE() have trouble when objects are involved...like looking for a specific property, but this is just a straight memory variable. How can this be erroring out? We are goung to try using TYPE("mdepartment") instead, but I am still curious as to why VARTYPE() is having problems here...
>
--sb--