Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox showing negative amounts in brackets
Message
From
05/11/2010 14:20:42
 
 
To
05/11/2010 13:39:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01488388
Message ID:
01488403
Views:
74
>>Hi,
>>
>>A client just asked me to display negative amounts in textboxes with the bracket, like (100.00) intead of -100.00. I did that for the reports, but in the textbox I did not find a formatting option for that. So I need to transform with "@(". But how can I combine with thousand seperator?
>>
>>
TRANSFORM(-1000000.00,"@(###,###.##")
>
>Unfortunately, the format property of the textbox, which corresponds to the function codes that go between the @ and the space in the picture parameter of the transform() function, does not support all of them.
>
>You can fake it by having the textbox.controlsource="transform(...)" when it doesn't have the focus, and switching to the real field when it does. That would mean setting a few properties in the .gotfocus() and .lostfocus(). Or maybe just .controlsource - haven't tried.

Fortunately it's a readonly field, so I don't need to worry for getfocus, or better yet, I will just use a label and set the caption. People ask for weird things sometimes.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform