Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox error using cursor
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00198175
Message ID:
00198209
Views:
19
>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

Nick,

Try this;

cbosubkey.rowsopurcetype = 2
cbosubkey.rowsource = "select sub_key.sub_key, sub_key.sub_vendor from sub_key where sub_key.main_keys = INT(VAL(Thisform.cboMainKey.Value)) into cursor hldsubkey"

In teh form designer, then in the interactivechange of cbomainkey put Thisform.cboSubKey.Requery()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform