General information
Category:
Coding, syntax & commands
Title:
Combobox error using cursor
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only