Message
From
18/12/2006 03:46:33
 
 
To
18/12/2006 03:35:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01178386
Message ID:
01178480
Views:
28
hi,
thank you ,

FOR i = start with (thisform.text2.value) TO end with (thisform.text12.value)
all of texts is characters type.
**** but my guess is NOT EMPTY() is what you really want??? yes
thank you.
>
>FOR i = FirstTextboxNumber TO LastTextboxNumber
>   IF EVALUATE(EVALUATE("thisform.text"+TRANSFORM(I)+".value")) > SPACE(10)
>   ****  but my guess is NOT EMPTY() is what you really want
>	REPLACE (EVALUATE("thisform.text"+TRANSFORM(i)+".value")) WITH newname
>ENDIF
>ENDFOR
>
>
>>hi,
>>thank you for help and code,
>>this code under works....is there any other way to rewrite i mean new way
>><pre>
>>IF (thisform.text2.Value)> SPACE(10)
>>     REPLACE (thisform.text2.Value) WITH NEWNAME
>>endif
>>IF (thisform.text3.Value)> SPACE(10)
>>     REPLACE (thisform.text3.Value) WITH NEWNAME
>>endif
>>IF (thisform.text4.Value)>space(10)
>>    REPLACE (thisform.text4.Value) WITH NEWNAME
>>endif
>>
>>IF (thisform.text5.Value)>space(10)
>>     REPLACE (thisform.text5.Value) WITH NEWNAME
>>endif
>>IF (thisform.text6.Value)>space(10)
>>     REPLACE (thisform.text6.Value) WITH NEWNAME
>>endif
>>IF (thisform.text7.Value)>space(10)
>>    REPLACE (thisform.text7.Value) WITH NEWNAME
>>endif
>>
>>IF (thisform.text8.Value)>space(10)
>>     REPLACE (thisform.text8.Value) WITH NEWNAME
>>endif
>>IF (thisform.text9.Value)>space(10)
>>     REPLACE (thisform.text9.Value) WITH NEWNAME
>>endif
>>IF (thisform.text10.Value)>space(10)
>>    REPLACE (thisform.text10.Value) WITH NEWNAME
>>endif
>>
>>IF (thisform.text11.Value)>space(10)
>>     REPLACE (thisform.text11.Value) WITH NEWNAME
>>endif
>>IF (thisform.text12.Value)>space(10)
>>    REPLACE (thisform.text12.Value) WITH NEWNAME
>>endif
>>
>>
>>thanks
>>
>>>>hi all,
>>>>
>>>>is there a way to convert it to vfp code
>>>>
>>>>for i= thisform.text1.value to  thisform.text12.value
>>>> if (i)any text <>space""
>>>>    REPLACE (thisform.text2.Value) WITH NEWNAME
>>>>    REPLACE (thisform.text3.Value) WITH NEWNAME
>>>>    REPLACE (thisform.text4.Value) WITH NEWNAME
>>>>    REPLACE (thisform.text5.Value) WITH NEWNAME
>>>>..
>>>>..
>>>>..
>>>>..
>>>>..
>>>>    REPLACE (thisform.text11.Value) WITH NEWNAME
>>>>    REPLACE (thisform.text12.Value) WITH NEWNAME
>>>> ENDIF
>>>>ENDFOR
>>>>
>>>>thanks.
>>>
>>>I am not sure exactly what you want to do.
>>>
>>>To loop through the textboxes, you might use something like this:
>>>
>>>
>>>for i = 1 to 12
>>>  loTextBox = eval("ThisForm.Text" + trans(i))
>>>  loTextBox.Value = ...
>>>  loTextBox.Visible = ...
>>>  loTextBox.Top = ...
>>>  * or whatever other property you want to change in each TextBox
>>>next
>>>
>>>
>>>REPLACE is used for fields in a table. To change the TextBox, just use the .Value property.
>>>
>>>If you want to REPLACE table fields, where do you have the name of the fields, and the values?
Previous
Next
Reply
Map
View