>CLOSE DATABASES >CLEAR > >SET MULTILOCKS ON && Allow table buffering >OPEN DATABASE (HOME(2) + 'data\testdata') >USE Customer && Open customer table >=CURSORSETPROP("Buffering",5,"customer") && Enable table buffering > >oform = CREATEOBJECT('testform') >oform.show() >READ EVENTS > >CLOSE ALL >RETURN > >DEFINE CLASS testform AS form > > > Top = 0 > Left = 0 > Height = 350 > Width = 556 > DoCreate = .T. > Caption = "Form1" > Name = "Form1" > > > ADD OBJECT txtcust_id AS textbox WITH ; > Comment = "Unique Customer ID code made up of the first five character of the Customer's Company name.", ; > ControlSource = "customer.cust_id", ; > Height = 23, ; > Left = 99, ; > MaxLength = 6, ; > TabIndex = 2, ; > Top = 19, ; > Width = 55, ; > Name = "txtCust_id" > > > ADD OBJECT lblcust_id AS label WITH ; > AutoSize = .T., ; > WordWrap = .T., ; > BackStyle = 0, ; > Caption = "Cust_id", ; > Left = 48, ; > Top = 19, ; > Width = 43, ; > TabIndex = 1, ; > Name = "lblCust_id" > > > ADD OBJECT txtcompany AS textbox WITH ; > Comment = "", ; > ControlSource = "customer.company", ; > Height = 23, ; > Left = 138, ; > MaxLength = 40, ; > TabIndex = 4, ; > Top = 60, ; > Width = 288, ; > Name = "txtCompany" > > > ADD OBJECT lblcompany AS label WITH ; > AutoSize = .T., ; > WordWrap = .T., ; > BackStyle = 0, ; > Caption = "Company", ; > Left = 77, ; > Top = 60, ; > Width = 53, ; > TabIndex = 3, ; > Name = "lblCompany" > > > ADD OBJECT txtcontact AS textbox WITH ; > Comment = "Primary contact for this Customer.", ; > ControlSource = "customer.contact", ; > Height = 23, ; > Left = 128, ; > MaxLength = 30, ; > TabIndex = 6, ; > Top = 103, ; > Width = 219, ; > Name = "txtContact" > > > ADD OBJECT lblcontact AS label WITH ; > AutoSize = .T., ; > WordWrap = .T., ; > BackStyle = 0, ; > Caption = "Contact", ; > Left = 78, ; > Top = 103, ; > Width = 42, ; > TabIndex = 5, ; > Name = "lblContact" > > > ADD OBJECT command1 AS commandbutton WITH ; > Top = 168, ; > Left = 140, ; > Height = 27, ; > Width = 210, ; > Caption = "Get Field State of Customer ID Field", ; > Name = "Command1" > > ADD OBJECT command2 AS commandbutton WITH ; > Top = 200, ; > Left = 140, ; > Height = 27, ; > Width = 210, ; > Caption = "NEXT", ; > Name = "Command2" > > ADD OBJECT command3 AS commandbutton WITH ; > Top = 240, ; > Left = 140, ; > Height = 27, ; > Width = 210, ; > Caption = "PREV", ; > Name = "Command3" > > PROCEDURE destroy > CLEAR EVENTS > ENDPROC > > PROCEDURE load > =CURSORSETPROP("Buffering",3,"customer") && Test Row buffering > ENDPROC > > PROCEDURE command1.Click > nState=GETFLDSTATE("cust_id") > wait WINDOW "Cust_id Field State is: "+ALLTRIM(STR(nState)) NoWAIT > ENDPROC > > PROCEDURE command2.Click > skip > thisform.refresh() > ENDPROC > > PROCEDURE command3.Click > skip - 1 > thisform.refresh() > ENDPROC > >ENDDEFINE >>