LiamP
(LiamP)
September 14, 2017, 7:09pm
1
I have a simple integer field that may be zero or some positive integer.
I use Format(iActive, “##,###”) to assign to a textfield on a form.
If iActive is zero, it prints 0. If it is zero I want it to print a blank (or not print anything).
Obviously I can test the textfield afterward and compare to “0” and replace with a blank, but is there not a more straight forward way to do this?
thanks
Just an untested guess, but from reading this, what about the format ##,###;-##,###;
(using a second semicolon, but intentionally leaving the zero value empty).
LiamP
(LiamP)
September 14, 2017, 7:34pm
3
I don’t see the second format spec in the docs. At least when I click the big question mark at the top of the Xojo window. Where do I find this?
LiamP
(LiamP)
September 14, 2017, 7:36pm
5
Okay, I see it. It’s just in the format at the top of the page it just shows one set.
Thanks Tim,
b