Information générale
Catégorie:
Codage, syntaxe et commandes
>I came back to post just that very problem I encountered with the solution.
>While your solution solves the tabbing around problem, there is one other problem I was not sure the answer to. What can be done in the situation where the user does in fact enter a decimal point in the textbox while entering in the amount? In that situation, the amount still gets divided by 100. ex: Enter 1500 and get 15.00(good) but enter 15.00 and then you get .15(not good)
>How can the control check to see if the user adds the decimal and if not then it gets added?
>I tried this(but it didn't work):
>this.value=iif(substr(right(str(this.value,12,2),3),1,1)=".",this.value,this.value/100)
Check the syntax to be sure, but roughly:
llDecimal = AT(str(this.value),".") > 0
IF NOT llDecimal
this.value = this.value / 100
ENDIF
(Look at AT particularily. I get that backwards a lot)
-Michelle
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement