** END HEADER -- do not remove this line // // Generated on 2020-06-17 // parameter bModal local f f = new Ketan1Form() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class Ketan1Form of FORM with (this) onOpen = class::FORM_ONOPEN height = 16.0 left = 61.5714 top = 2.7727 width = 40.0 text = "" endwith this.DBASESAMPLES1 = new DATABASE(this) with (this.DBASESAMPLES1) left = 17.0 width = 11.0 height = 1.0 databaseName = "DBASESAMPLES" active = true endwith this.CUSTOMERS1 = new QUERY(this) with (this.CUSTOMERS1) left = 6.0 top = 1.0 width = 9.0 height = 1.0 database = form.dbasesamples1 sql = "select * from CUSTOMERS.DBF" active = true endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 1.0909 left = 9.2857 top = 9.0909 width = 15.2857 text = "Start" endwith this.ENTRYFIELD1 = new ENTRYFIELD(this) with (this.ENTRYFIELD1) height = 1.0 left = 18.1429 top = 3.6364 width = 8.0 value = 0 endwith this.TEXTLABEL1 = new TEXTLABEL(this) with (this.TEXTLABEL1) height = 1.0 left = 5.2857 top = 3.7273 width = 12.0 text = "Record No" endwith this.rowset = this.customers1.rowset function PUSHBUTTON1_onClick() form.customers1.rowset.first() n = 0 do while not form.customers1.rowset.endofset n++ _app.executeMessages() form.entryfield1.value = n // anything that needs to be done goes here sleep(.05) //a pause here for the test otherwise //everything happens so fast that it looks as if //the program has gone straight to the last record //without doing anything. form.customers1.rowset.next() enddo return function form_onOpen() _app.AllowYieldOnMsg := true return endclass