How about:
Column.ControlSource = ThisForm.MySpecialFormat(IntegerField)
local lcReturnValue
do case
case IntegerField = 1
lcReturnValue = "Msg 1"
...
return padr(lcReturnValue, 10)
Another option is nested iif's, but this is hard to read.
>Hi All.
>
>I have a grid with a few columns. One of the columns references an integer field. This field can have one of 5 basic values. Is there a way to dynamically convert the integer value to a text description in the column? i.e. Instead of displaying the field value of 1 the column would display "Msg 1", instead of field value 2 the column would display "Msg 2", and so forth. Any easy solution?
>
>VFP8
>
>Thanks
>
>PS. I did try using a combo box in the column but this seemed to have a detrimental effect on the grid refresh speed?
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)