>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()