>>>>This could be done much easily using grid which has Tetx.InputMask properties working like PICTURE clause in Fox2.6.
>>>
>>>I can see that using a grid to display the information gives much more opportunity for formatting but I still have a problem. If I want to vary the display as I described i.e. 1.00 to display as 1, 1.05 to display as is, 1.50 to display as 1.5, 0 not to display at all I think I still need to use an expression. As I am displaying the contents of a cursor I can't specify that field concerned because the field selector only applies to fields in tables.
>>
>>You can use expression for Grid.Column.ControlSource.
>
>If I understand you correctly you mean that I can use "this.controlsource" to reference the data in the quantity field of the cursor I am viewing using the grid. I used a simplified expression to test it - "IIF(MOD((this.controlsource), CEILING(this.controlsource)) <>0, this.controlsource, INT(this.controlsource)) " in the format for column2 of the grid and got the error message - function argument value, type or count is invalid.
Here, you are wrong. You have to type expression into Column.ControlSource property sheet cell (or set it programmatically) like Grid.Column1.Controlsource=IIF(MOD(CEILING(fieldname1)....
Edward Pikman
Independent Consultant