Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying currency fields to 2dp.
Message
De
07/04/2006 09:54:42
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Displaying currency fields to 2dp.
Divers
Thread ID:
01111372
Message ID:
01111372
Vues:
53
I have an VFP-SQL application in which much of the data is stored in currency fields in the back-end SQL tables. These remain as currency fields when selected into remote views, hence with 4 dpl. Being a GBP application I wish to display and edit all currency values to 2 dpl.

I have tried a generic 'highest theoretical number' inputmask of 99,999,999.99 in my textbox foundation class, but many textboxes are only wide-enough to display smaller values (eg. 34.67), and the inputmask makes values look odd if the textbox is not wide enough to display the complete mask width, even if the data itself is shorter.

For read-only textboxes I can use ROUND(MTON(thisvalue),2) but this does not work for editable textboxes bound to a field controlsource.

I have thought of converting all view definitions to select currency fields as numeric fields, but my immediate problem here is that not all my views are defined in a .dbc, some are selected directly to a cursor using SPT.

Has anyone any ideas as to how to get around this problem? Ultimately I am trying to avoid having to enter the appropriate length inputmask for every textbox which displays a currency value.


TIA

Alan Harris-Reid
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform