Mohammed
In the .InteractiveChange event of texbox1 get the value of each key pressed using INKEY().
You can validate the key is in the range 0 - 9 and reject anything else.
Add each value to a form numeric property (which is the controlsource of textbox2), or simply add it to textbox2.value (maybe need refresh textbox2 each time to see the value incrementing in the result text box).
Terry
>hi all,
>
>how i can sum 4 numbers , insert to textbox1 as 1234,
>the code inside my form do ex.. 1+2+3+4.
>i want to get result at second textbox2 as (10).
>
>any help.
>thanks
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.