Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using thisform in ComboBox.RowSource
Message
 
To
08/11/2013 13:59:49
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01587572
Message ID:
01587608
Views:
72
>I want to use:
>SELECT * FROM MyTable WHERE MyField = thisform.MyObject.Text
>in ComboBox.RowSource property but I get error message that Thisform can be used only in methods.
>
>How to solve this?

Assuming that thisform.MyObject.Text is valid
(Try WAIT WINDOW TRANSFORM(thisform.MyObject.Text) and see what appears. If it's not text then that's your problem)
I have found that SQL does not like thisform so...
mText =  thisform.MyObject.Text
SELECT * FROM MyTable WHERE MyField = mText
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform