<snip>
>Has VFP already determined the width of the columns if the view is set to
NoDataOnLoad = .T. before REQUERY() is run?
>
>If the nField is numeric, how to define the width?
>
>I've used the same IIF expression in another view, it works fine. Why?
>
>My IIF expression is:
>
>IIF(nX = 1, nField1, nField1 * IIF(nX = 2, 1, nField2)/12)
>
>Field Type is : nField1 - N(5), nField2 - N(4)
>
>Is that OK?
VFP determines the column information when the view is opened. If NoDataOnLoad is .T., blank data is used.
I think your problem is with the second expression in the IIF. Since you are dividing by 12, the result may have decimal places. If nX = 1, the result will be an integer. That will cause the problem.
I don't know what the calculation is trying to accomplish but you might try use the ROUND or INT functions on the second expression.