Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading from a text box from within a method

Status
Not open for further replies.

ejhemler

Programmer
Aug 30, 2002
68
US
I have a button on a form so that when you click the button, I want the following to happen.

1.) Click button.

2.) Set focus to text box(5 characters) ex. thisform.textBox1.setFocus()

3.) Wait for 5 characters to be entered in the text box.

4.) After 5 characters are entered, read the data entered from the text box.

5.) Procede with program.

I have done this in foxpro version 2.6 with the read command, but the read command is no longer available with 6.0. I'm having a problem with steps 3 and 4. Any help is appreciated.

Thanks,
Erik
 
Hi

You can use to trap the user input value, using an InputBox and then continue with the process.

Example..
... code...
... code...
myString = INPUTBOX("Key In your Value for .... ")
.. code
.. code

To some extend this can help you. BUt this is not limited to 5 characters.

:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
ejhemler

1. Change you inputMask of the textbox to XXXXX or 99999 or what ever you want to accept, this way the valid of the textbox will trigger right after the 5th character and you can read the value of the textbox from the valid.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top