Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox select problem
Message
De
11/02/2009 05:34:46
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01380809
Message ID:
01380811
Vues:
44
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]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform