Constrain the input 
Author Message
 Constrain the input

I would like to constrain the input in text field so that user can input 0
to 9 or ? or * only.  I have posted checking code in "KeyPress" method but
it also failed.  How can I achieve this?

Thank you very much!



Sun, 28 Aug 2005 12:28:53 GMT  
 Constrain the input
Forgot to say...

If the user wants to input a character, say, A, there will be no response.



Sun, 28 Aug 2005 13:45:51 GMT  
 Constrain the input
Go back to the KEYPRESS event and use code such as:

    IF [keystroke is not 1-9, *, or ?]
        NODEFAULT
    ENDIF

The NODEFAULT prevents the keystroke from being executed.

 - Rush


Quote:
> I would like to constrain the input in text field so that user can input 0
> to 9 or ? or * only.  I have posted checking code in "KeyPress" method but
> it also failed.  How can I achieve this?

> Thank you very much!



Sun, 28 Aug 2005 23:21:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Why is my trace window constrained?

2. converting form driven input to code driven input

3. Change the microphone mixer input to the sound card mixer input

4. Character Input Control for Input Fields

5. How to input Simplified Chinese in VFP

6. Help w/Multi Screen Inputs Within Same Window

7. Font for secure data input (It's all STARS *****) - foxstar.zip (1/1)

8. Font for secure data input (It's all STARS *****)

9. Scroll Bars on Data Input Screens ?

10. Q: Keyboard input speed - Popups

11. Preventing Duplicate Record Input

12. @GET input Fields and the mouse cursor??

 

 
Powered by phpBB® Forum Software