I'm sure I'm the only one with this problem - but you never know... and if anyone else has already come up with the same thing - I'm sorry to repeat you!
When a user clicks into a text box with a numeric value (rather than using the keyboard to enter it) the 'select' function doesn't fire and sometime the numeric value the user meant to enter can be multiplied by 10 - dependant on where the cursor clicks to (if you follow me!).
This is because if the number they enter starts more than a space away from the period marker VFP automatically inserts an extra 0 to the left of it
Now, you can 'train' the users to avoid this - but today I had an Director of a clients company complaining about it when HE does data entry. There is only so much you can teach someone in that kind of exulted position, so I dreamt up this...
Put the following in the text boxes click event:
Now, the text box mimics the action that would have been fired should the user have tabbed in!
Simple to do, and if ou leave the 'doubleclick' event alone the user can still 'edit' the text by double clicking!
HTH
Regards
Griff
Keep [Smile]ing
When a user clicks into a text box with a numeric value (rather than using the keyboard to enter it) the 'select' function doesn't fire and sometime the numeric value the user meant to enter can be multiplied by 10 - dependant on where the cursor clicks to (if you follow me!).
This is because if the number they enter starts more than a space away from the period marker VFP automatically inserts an extra 0 to the left of it
Code:
i.e.
[ 100 .00] becomes [ 1000.00] as the user exits the
text box.
Now, you can 'train' the users to avoid this - but today I had an Director of a clients company complaining about it when HE does data entry. There is only so much you can teach someone in that kind of exulted position, so I dreamt up this...
Put the following in the text boxes click event:
Code:
this.selstart = 0
this.sellength = 120 && a number much bigger than the size of any reasonable number!
Now, the text box mimics the action that would have been fired should the user have tabbed in!
Simple to do, and if ou leave the 'doubleclick' event alone the user can still 'edit' the text by double clicking!
HTH
Regards
Griff
Keep [Smile]ing