PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************* *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 01/21/08 08:05:08 PM * DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT text1 AS textbox WITH ; Alignment = 3, ; Value = 3.56, ; Height = 27, ; Left = 66, ; Top = 10, ; Width = 105, ; Name = "Text1" ADD OBJECT text2 AS textbox WITH ; Alignment = 3, ; Value = 4.05, ; Height = 27, ; Left = 81, ; Top = 47, ; Width = 105, ; Name = "Text2" ADD OBJECT text3 AS textbox WITH ; Alignment = 3, ; Value = 3.04, ; Height = 27, ; Left = 121, ; Top = 89, ; Width = 105, ; Name = "Text3" ADD OBJECT text4 AS textbox WITH ; Alignment = 3, ; Value = 2.99, ; Height = 27, ; Left = 165, ; Top = 135, ; Width = 105, ; Name = "Text4" ADD OBJECT command1 AS commandbutton WITH ; Top = 190, ; Left = 71, ; Height = 28, ; Width = 126, ; Caption = "Command1", ; Name = "Command1" PROCEDURE command1.Click FOR lnCount = 1 TO 3 IF EVALUATE([ThisForm.Text]+TRANSFORM(m.lnCount ) + [.Value]) > ; EVALUATE([ThisForm.Text]+TRANSFORM(m.lnCount+1) + [.Value]) MESSAGEBOX([The value in Text]+TRANSFORM(m.lnCount+1)+[ is smaller then Text]+TRANSFORM(m.lnCount)) ENDIF NEXT ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************Test this example and if all is OK