Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Findout none empty textbox
Message
From
14/12/2006 03:05:51
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01177475
Message ID:
01177501
Views:
13
Borislav,

If I understand correctly, your program has a flaw which may cause VFP to crash later. I guess you have read the articles about what can happen if you issue a return inside a with-endwith block. You exit inside a with-endwith block, I guess this may actually cause the same crash. But I may be wrong?

>>Dear Experts,
>>
>>I have 20 textboxes on form.
>>only one textbox has data, all other 19 textbox are empty.
>>
>>Textbox name are text1---text20.
>>
>>How to findout which textbox is not empty?
>>
>>Pleaes help
>
>If they are named Text1...Text20, then:
>
>LOCAL lnFor, loTextBox
>lnFor = 0
>loTextBox = NULL
>FOR lnFor =  1 TO 20
>    WITH EVALUATE([thisform.Text]+TRANSFORM(lnFor))
>         IF NOT EMPTY(.Value)
>            loTextBox = EVALUATE([thisform.Text]+TRANSFORM(lnFor))
>            EXIT
>         ENDIF
>    ENDWITH
>NEXT
>IF NOT ISNULL(loTextBox)
>   WAIT WINDOW loTextBox.Name
>ENDIF
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform