function CarCodeToCarName lparameter tcCarCode local lcCarName do case case tcCarCode = 1 lcCarName = "Ford" case tcChevy lcCarName = "Chevy" case etc otherwise lcCarName = "Unknown" endcase *-- padr is necessary because the size of the field * will be set by VFP based on the first record * and we want it to be large enough to hold any value. return padr(lcCarName, 20)Anyway, having a table for car types is probably a better solution :)