>if !empty(combo1.value) > set exact off > set near on > select subclases1 &&cursor 2, the cursor 1 is filling the combo 1 > go top > set filter to subclases1.clase=k_clase && public variable > locate for subclases1.subclase=val(thisform.nsubclase) &&form property > this.value=thisform.nsubclase >else > select subclases1 > set filter to subclases1.clase=k_clase >endif >set exact on >set near on >thisform.refresh >>i can make the filter only is i am makin a new register, but modifying not.
Set Textmerge delimiters to '%%','%%' Public oForm oForm = CreateObject('cmbLinked') oForm.Show Define Class cmbLinked As Form DataSession=2 Height = 70 Width = 615 Add Object lblCustomer As Label With Caption="Customer ID:",Left=5,Top=5,Autosize=.t. Add Object lblOrders As Label With Caption="Orders:[0]",Left=310,Top=5,AutoSize=.t. Add Object cmbCustomer As ComboBox With Left=5,Top=30,Width=300 Add Object cmbOrders As ComboBox With Left=310,Top=30,Width=300 Procedure Init With This.cmbCustomer .RowSourceType = 3 .RowSource = "select company,cust_id from customer into cursor cboAna" Endwith With This.cmbOrders .RowSourceType = 3 .RowSource = "select order_id,order_date,cust_id"+; " from orders"+; " where cust_id = cboAna.cust_id"+; " into cursor cboAlt" .ColumnCount = 3 Endwith Endproc Procedure cmbCustomer.InteractiveChange Local lnOrders With This.Parent.cmbOrders .ListIndex=0 .Requery() lnOrders = .ListCount Endwith this.Parent.lblCustomer.Caption = "Customer ID:"+cboAna.Cust_id this.Parent.lblOrders.Caption = Textmerge('Orders:[%%m.lnOrders%%]') Endproc EnddefineCetin