>how do i convert undefine (U) data type to character data type (C)
I will assume you want to assign a default value when the variable doesn't exist.
Let's say, also, that you want to be sure the expression is always of type "C" (not numeric, etc.).
MyVariable = iif(type("MyVariable" = "U"), "???", transform(MyVariable))
transform(), as used here, requires VFP 6 or later.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)