Binding EditFields to a Multi-Column ListBox
If you have a ListBox with multiple columns and want to bind EditFields to the columns so that when you select a row with a mouse click or with arrows the EditFields match the columns in the ListBox, then use the change event for the ListBox and assign the EditFields. For instance, for a ListBox with date, title, type, and entry columns and EditFields by the same name, put this code in the Change event for the Listbox:
datefield.Text = me.cell(me.ListIndex,0)
titlefield.Text = me.cell(me.ListIndex,1)
typefield.Text = me.cell(me.ListIndex,2)
entryfield.Text = me.cell(me.ListIndex,3)
|
Note that if you want to bind a single column ListBox and an EditField, simply select both and add a binding. The above method isn't a binding in this sense, but it does what is needed.
|
|