Mensaje
De
26/06/2001 06:58:49
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
a
26/06/2001 06:41:13
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Foro:
Visual FoxPro
Category:
Miscellaneous
ID de la conversación:
00523448
ID del mensaje:
00523454
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
Jimi
put the code in the valid event
and instead of this.sefocus() put return 0
or call the NODEFAULT in the lostfocus

>Hello everyone,
>
>I used the following code in a textbox's lostfocus event to ensure the user input 0-3 for it. If the value isn't 0-3, I want the program to empty the textbox and set foucus on it. I used the following code:
>
>
>if val(this.value)<0 or val(this.value)>3 then
>  messagebox("Value must be 0-3", 16)
>  this.value=""
>  this.setfocus()
>endif
>
>
>but the setfocus() just not working, after the messagebox only the next object of the textbox get the focus. What should I do to prevent this?
>
>Thanks a lot!
Alexandre Palma
Senior Application Architect
Previous
Responder
Mapa
Ver