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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use text boxed to contain varables

Status
Not open for further replies.

udayan

Programmer
Dec 6, 2002
5
0
0
IN
I am migrating from the dos versions of Xbase to vfp6
can somebody tell me how to convert the textboxes into variables to input and output data - string, numeric and text. I need this to select a seach from the databases
Uday
dharwad@mailcity.com
 
Hi

1. Assume your text box is named as Text1.. the value in it can be referenced as..
ThisForm.Text1.Value

2. If you want a public variable to be controlled by this text box, so that you can refernce that..
In your main.prg add
PUBLIC myVar
myVar = 0
In the forms Text1 property set the Control SOurce as
m.myVar

SO as you key into the text1 box while running the form, the value will be taken to the variables automaticaly, because that is the control source.

3. Another way is..
YOu can have the Public variable as said above.
You can put in the LOSTFOCUS event of Text1.. m.myVar = This.Value

So there are number of ways to do what you want :) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top