>Dear Experts
>
>Text1 has value 0 and the cursor is in text1.
>If I press plus sign(+) then text1 value should increase by 1
>If I press minus sign(-) then text1 value should derease by 1
>but the value should not go to below 0
>
>Please help
Use a spinner, or add this code to the KeyPress method:
LPARAMETERS nKeyCode, nShiftAltCtrl
Do case
case chr(nKeyCode)='+'
nodefault
this.value=this.value+1
case chr(nKeyCode)='-' and this.value>0
nodefault
this.value=this.value-1
Endcase