> thisform.text1.value=this.value >>
PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- BaseClass: form DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT combo1 AS combobox WITH ; Height = 24, ; Left = 42, ; Top = 40, ; Width = 290, ; Name = "Combo1" ADD OBJECT text1 AS textbox WITH ; Height = 23, ; Left = 70, ; Top = 113, ; Width = 211, ; Name = "Text1" PROCEDURE Init Thisform.combo1.ColumnCount = 3 Thisform.combo1.Style = 2 ThisForm.combo1.ControlSource = [Invoices] ThisForm.Combo1.RowSourceType = 6 Thisform.combo1.RowSource =[Invoices.inv_text,inv_number,other] ThisForm.combo1.BoundColumn = 2 ThisForm.Combo1.InteractiveChange() ENDPROC PROCEDURE Load CLOSE DATABASES ALL CREATE TABLE Invoices (Inv_number n(10), inv_text C(30),other C(20)) INSERT INTO Invoices VALUES(54,[Invoice_54],[other_text1]) INSERT INTO Invoices VALUES(55,[Invoice_55],[other_text2]) INSERT INTO Invoices VALUES(56,[Invoice_56],[other_text3]) INSERT INTO Invoices VALUES(57,[Invoice_57],[other_text4]) ENDPROC PROCEDURE combo1.InteractiveChange ThisForm.Text1.Value = This.Value &&& return Invoices.inv_number, &&& because ThisForm.combo1.BoundColumn = 2 &&& and Thisform.combo1.RowSource =[Invoices.inv_text,inv_number,other] ENDPROC ENDDEFINE *-- EndDefine: form1 **************************************************