Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Null values in a textbox
Message
 
 
À
23/08/2002 13:33:31
Fabian Valencia
Calamos Asset Managment Inc.
Naperville, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00693042
Message ID:
00693308
Vues:
28
Try this
* Textbox KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
IF Isnull(This.Value) AND Inlist(Chr(nKeyCode), "-1234567890.")
  This.Value = 0.00
ENDIF
BTW, you can use 'CTRL+0' shortcut to enter Nulls.

>Whenever you want to use a textbox for numeric data you can have a problem with null values.
>Ex. I have a form with a textbox whose inputmask is 999.99 and I set the value of the textbox to 0.
>I can go into the textbox and change the number and the vartype remains numeric. I also have a button on the form that sets the textbox.value to .null. Now if I try to change the data in the textbox say by typing 123.45
>the textbox.value type has changed to character. If I assign a controlsource then I can type a number in the textbox but it remains a character datatype.
>
< snip >
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform