General information
Category:
Forms & Form designer
Dear all,
In order to proide the user entering numeric datas in the format ??K,
so that when 20K is entered; the entry will actually 20,000
and if 20000 is entered; the entry will be straght follow 20,000
in the textbox valid event I add:
if right(this.value,1)="K" .or. right(this.value,1) = "k"
this.value=val(substr(this.value,1,len(this.value)-1)*1000)
else
this.value=val(this.value)
endif
The implementation is found run well.
However, when I make the controlsource of the textbox to be a numeric field of the table, problem is found that I can not enter ??K format, for "K" is non-numeric;
I add a line at the about valid event to solve:
thisform.anothertextbox.value=this.value;
in which delete the controlsource of the textbox; but make the controlsource of the anothertextbox be the original field I assign for the textbox.
Besides this solution, is there any alternative ??
Regards,
Ransome
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only