I have two binding sources with a common dataset for datasource. Both used on a single form, one for displaying a specific row for data and the other for displaying user selected data.
The first bindingsource filter is set using the constructor of the form and works as required, the second is set when the user makes a selection from a combo box. The selected value is used as the filter for the binding source. The resulting data is displayed by setting the values in controls on the form rather than using bound controls.
All works well except that the second bindingsource filter isn't applied until the user selects the same choice in the combobox a second time.
The first time a selection is made, the bindingsource.count returns 0, the second time for the same entry, the bindingsource.count returns the proper number of rows and the correct data is shown in the form controls.
the following code is in the combobox_Selectionchangecommitted event
bindingsource.filter = "id = " & combobox.selectedvalue
bindingsource.movelast
textbox.text=bindingsource.item(bindingsource.positon).item("text data")
I have looked over numerous forms but havn't found a thread for this issue.
Any suggestions appreciated.
The first bindingsource filter is set using the constructor of the form and works as required, the second is set when the user makes a selection from a combo box. The selected value is used as the filter for the binding source. The resulting data is displayed by setting the values in controls on the form rather than using bound controls.
All works well except that the second bindingsource filter isn't applied until the user selects the same choice in the combobox a second time.
The first time a selection is made, the bindingsource.count returns 0, the second time for the same entry, the bindingsource.count returns the proper number of rows and the correct data is shown in the form controls.
the following code is in the combobox_Selectionchangecommitted event
bindingsource.filter = "id = " & combobox.selectedvalue
bindingsource.movelast
textbox.text=bindingsource.item(bindingsource.positon).item("text data")
I have looked over numerous forms but havn't found a thread for this issue.
Any suggestions appreciated.