Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox select problem
Message
From
11/02/2009 05:34:46
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01380809
Message ID:
01380811
Views:
45
Do not use objects in SELECT SQL. In the time and place where the SQL runs there might simply be no THISFORM.

Consider to replace the Thisform.MyField.Value like the following example.
.rowsource = "Select Code from Mytable where Type = ["+Thisform.MyField.Value+"] into Cursor MyCursor"
everytime you change the value in Thisform.MyField you need to redefine the .rowssource.

Agnes
>Hi All
>I have a combo box with Sql command as source
>This works fine:
>Select Code from Mytable where Type = 'ABC' into Cursor MyCursor
>
>However, if the where is taken from another field on the screen as in
>Select Code from Mytable where Type = Thisform.MyField.Value into Cursor MyCursor
> nothing is selected even though MyField.Value contains 'ABC'
>
>Anybody got any ideas ?
>Regards,
>Gerard
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform