Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox error using cursor
Message
De
16/03/1999 12:51:43
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00198175
Message ID:
00198208
Vues:
22
Nick-
That's because the variable no longer exists when the method is done. Instead, you can create a custom property of the form called lc_mainKey instead and assign the value to that. Then change your select statement to be
where sub_key.main_keys = thisform.lc_mainkey
>I am trying to create a combobox that will display values from a cursor but I key getting errors. My problem starts with the cursor. When I create cursor based on a variable from another field:
>
>if int(val(thisform.cboMainkey.value)) > 0
> thisform.cboSubkey.visible = .t.
> lc_mainkey = int(val(thisform.cboMainkey.value))
> select sub_key.sub_key, sub_key.sub_vendor from sub_key;
> where sub_key.main_keys = lc_mainkey into cursor hldsubkey
> thisform.cboSubkey.rowsource = 'hldsubkey'
> thisform.cboSubkey.rowsourcetype = 2
>else
>thisform.cboSubkey.visible = .f.
>endif
>
>lc_mainkey is a variable containing a value of another combobox. I am trying to create a second combobox based on cursor created above. However I get errors saying it cannot find variable LC_MAINKEY. How else can I create a combobox based on another field value? Is my rowsouce wrong or is it not possible to create cursor based on variables? Help greatly appreciated
>
>Nick Patel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform