loForm = CREATEOBJECT('myForm') loForm.Show() READ EVENTS DEFINE CLASS myForm as Form ShowWindow = 2 &&as top level form oData_1 = .null. && reference for the biz obj oData_2 = .null. oItemCollection = .null. PROCEDURE init *** Setup the test data loDataItem = CREATEOBJECT("Empty") ADDPROPERTY(loDataItem, "non_null_value", 55) ADDPROPERTY(loDataItem , "null_value", 0) loDataItem.null_value = .null. this.oItemCollection = CREATEOBJECT("Collection") this.oItemCollection.Add(loDataItem) FOR EACH loItem IN this.oItemCollection this.oData_1 = loItem ENDFOR FOR i = 1 TO this.oItemCollection.count this.oData_2 = this.oItemCollection.item(i) ENDFOR *** setup controls this.AddObject("txtNonNullField1", "TextBox") this.txtNonNullField1.Visible = .T. this.txtNonNullField1.left = 10 this.txtNonNullField1.top = 10 * the following field will not be editable, untill you change the value of txtNullField2 * or change this.odata_1.null_value programmatically or in the watch window. If you * can edit this field, there must be something in my environment. this.AddObject("txtNullField1", "TextBox") this.txtNullField1.Visible = .T. this.txtNullField1.left = 10 this.txtNullField1.top = 38 this.AddObject("lblComment", "Label") this.lblComment.Visible = .T. this.lblComment.left = 125 this.lblComment.top = 38 this.lblComment.autosize = .T. this.lblComment.caption = "Can't edit me! (until you update the bound prop elsewhere...)" this.AddObject("txtNonNullField2", "TextBox") this.txtNonNullField2.Visible = .T. this.txtNonNullField2.left = 10 this.txtNonNullField2.top = 66 this.AddObject("txtNullField2", "TextBox") this.txtNullField2.Visible = .T. this.txtNullField2.left = 10 this.txtNullField2.top = 94 *** bind the controls this.txtNonNullField1.controlsource = "thisform.oData_1.non_null_value" this.txtNullField1.controlsource = "thisform.oData_1.null_value" this.txtNonNullField2.controlsource = "thisform.oData_2.non_null_value" this.txtNullField2.controlsource = "thisform.oData_2.null_value" ENDPROC PROCEDURE Destroy CLEAR EVENTS ENDPROC ENDDEFINE