local lcPK this.AddProperty("lRemain", .f.) lcPK = this.value with this.parent .cboCarrier_Branches.rowsource = "" .Carrier_Branches_Merge_biz1.Set_fk(m.lcPK) .Carrier_Branches_Merge_biz1.requery(.t.,'crsCarrier_branches_All_merge') .cboCarrier_Branches.rowsourcetype = 2 .cboCarrier_Branches.rowsource = 'crsCarrier_branches_All_merge' .cboCarrier_Branches.requery() .cboCarrier_Branches.enabled = .t. do case case reccount('crsCarrier_branches_All_merge') = 1 =ErrorMsg("The carrier " + alltrim(.cboCarriersToSelect.displayvalue) + ; " has only 1 branch") this.lRemain = .t. RETURN 1 && Otherwise typing new sequence doesn't work case reccount('crsCarrier_branches_All_merge') = 0 =ErrorMsg("The carrier " + alltrim(.cboCarriersToSelect.displayvalue) + " does not have branches") this.lRemain = .t. RETURN 1 endcase .cboCarriers.enabled = .f. endwith return dodefault()LostFocus event
if type("this.lRemain") = "L" if this.lRemain nodefault endif this.lRemain = .f. endif