if file('test_in.dbf') // drop table test_in endif if not file('test_in.dbf') create table test_in (id autoinc,emp character(15),staffarea character(15)) //endif insert into test_in (emp,staffarea) values ("Abel","ADH") insert into test_in (emp,staffarea) values ("Baker","AFG") insert into test_in (emp,staffarea) values ("Charlie","ADG") insert into test_in (emp,staffarea) values ("David","BDG") insert into test_in (emp,staffarea) values ("Edward","BDH") insert into test_in (emp,staffarea) values ("Frank","AHF") endif ** END HEADER -- do not remove this line // // Generated on 2018-07-18 // parameter bModal local f f = new test_inForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class test_inForm of FORM with (this) height = 16.0 left = 7.5714 top = 10.1818 width = 76.1429 text = "" endwith this.TEST_IN1 = new QUERY(this) with (this.TEST_IN1) left = 3.0 width = 6.0 height = 1.0 sql = 'select * from "test_in.DBF" where staffarea like :sa' params["sa"] = "%" active = true endwith this.GRID1 = new GRID(this) with (this.GRID1) dataLink = form.test_in1.rowset height = 8.6818 left = 7.0 top = 2.8182 width = 62.0 endwith this.COMBOBOX1 = new COMBOBOX(this) with (this.COMBOBOX1) onOpen = class::COMBOBOX1_ONOPEN height = 1.0 left = 13.0 top = 12.5 width = 17.0 dataSource = 'array {"A","B","C","D","E","F","G","H"}' style = 1 // DropDown endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 1.0909 left = 47.0 top = 12.5 width = 15.2857 text = "Select" endwith this.PUSHBUTTON2 = new PUSHBUTTON(this) with (this.PUSHBUTTON2) onClick = class::PUSHBUTTON2_ONCLICK height = 1.0909 left = 47.0 top = 14.0 width = 15.2857 text = "Show all" endwith this.rowset = this.test_in1.rowset function COMBOBOX1_onOpen() this.value = 'Select Area' return function PUSHBUTTON1_onClick() form.test_in1.params['sa'] = '%'+form.combobox1.value+'%' form.test_in1.requery() return function PUSHBUTTON2_onClick() form.combobox1.value = 'Select Area' form.test_in1.params['sa'] = '%' form.test_in1.requery() return endclass