>I am haveing trouble with a select statement. One of the fields is a calculated field -cfnos(dm_released,noofshts) As noofshts-. If the variable dm_released evaluates to a temporary change value the value returned is a 1, otherwise the value returned is noofshts. My problem is if the first returned value is 1 it sets the field width to one charactor and any two digit values appear as an asterisk. If the first value is two digits all is well. Thanks for the help.
This is how VFP Select statements work. The first record evaluated in that character column sets the width for that column.
In your cfnos() routine, PadR() the return value to 2.
Insanity: Doing the same thing over and over and expecting different results.