>>transform(thisfField, "@Z 999,999,999")
>>
>>will return eleven spaces when thisfField is zero.
>
>Either I misunderstood Terry or he misunderstood the problem. His response (at least to me) indicated he was talking about formatting a field on a report (is there another place where "Print When" is used?).
>
>My problem is a textbox on a form. I would like to have it display Blank When Zero. Naomi's suggestion about the format property of the textbox was what I was using. It takes care of the problem......Until the textbox gains focus. At that point the zero appears. I was hoping for a solution where, when I enter the textbox and its value is zero, nothing appears until I actually start typing something.
>
>Does your Transform() code work in that situation?
No, transform() is a function which returns a string - so it's something you can use when you're using numbers in text, display, report, caption - anywhere where you have strings composed.
For a textbox with a numeric controlsource, tough - you may add K function code (so make it KZ or ZK), that should select whole text when it gets focus, so at least when the user starts typing the zero would go away. That's actually equivalent to setting .SelectOnEntry=.t. for the textbox. But you can't get rid of the zero unless you make your textbox contain a string, not a number - and then manipulate it by the rules for number entry, IOW reinventing the wheel for a pound of meat.
You may look around the download area, there are classes for numeric input. Maybe one of them is where that particular wheel has already been invented.