>CASE lcfield="copr" > lccontrol.rowsourcetype=6 > lccontrol.rowsource="Opr.op_code" >Endcase >>Where lccontrol is the combobox. Have been trying for a couple of hours, but no luck yet.
PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 (e:\ut\form1.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 10/29/06 07:24:09 PM * DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 152 Width = 375 DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT lccontrol AS combobox WITH ; RowSourceType = 6, ; RowSource = "", ; Height = 25, ; Left = 59, ; Style = 2, ; Top = 27, ; Width = 257, ; Name = "lccontrol" ADD OBJECT command1 AS commandbutton WITH ; Top = 71, ; Left = 76, ; Height = 48, ; Width = 208, ; WordWrap = .T., ; Caption = "Change the rowsource of a combobox during...", ; Name = "Command1" PROCEDURE Load CREATE CURSOR Opr (Op_code c(20), Myvalue I) INSERT INTO Opr VALUES ("50 50",50) INSERT INTO Opr VALUES ("60 60",60) INSERT INTO Opr VALUES ("70 70",70) INSERT INTO Opr VALUES ("80 80",80) ENDPROC PROCEDURE command1.Click ThisForm.lccontrol.RowSourceType = 6 ThisForm.lccontrol.RowSource = [Opr.op_code] ThisForm.Command1.Enabled = .f. ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************Where is the problem?