Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox showing negative amounts in brackets
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01488388
Message ID:
01488405
Vues:
54
>>>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.

You are happy, if they ask weird things sometimes
As I know they ask then ALL the times :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform