Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Padding field with zeros when losing focus
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Padding field with zeros when losing focus
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01105913
Message ID:
01105913
Vues:
55
Can anybody help me please? Im going round the bend!!

I have a textbox on a form for which I only want the user to enter numbers. In addition to this I want to limit the users to only entering a maximum of 10 numbers. Therefore I have set the input max to ##########. This works fine but when the users loses focus on this control I want to pad left of the number they have typed in with zero's.

Therefore if the user types in 12345 then when they lose focus I want the system to put in 0000012345. I also want this field to be the first field when editing and the contents of the field to be highlighted.

In the lost focus event I have tried:
thisform.text1.value = PADL(thisform.text1.value,10,'0')
I know im being stupid but I cant seem to move forward!

Thanks
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform