General information
Category:
Coding, syntax & commands
>>>not a good day for me, I should know this.......But it's late and I'm tired and this is the only time-of-day I have available to donate my programming skills (such as they are) to the synagogue so...............
>>>
>>>Given a textbox with a numeric value.......what property do I set to what value so that the textbox will display BLANK when zero?
>>>
>>>Thanks...........Rich
>>
>>You could try the "print when" checkbox in the field's properties, type:
>>
>>IIF( ThisField > 0, ALLTRIM( STR( ThisField), "") && or some TRANSFORM() ion the field to get your formatting
>
>For those who missed this detail: you can actually combine the function codes in your transform()s. You only need to put them in front of the format string, preceded with an at sign and followed with a space. So, in this case
>
>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?
(I'm not in a position to test this myself right now since it applies to something I'm doing at home).
Thanks......Rich
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only