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

Click here to load this message in the networking platform