Visual Basic: Setting up a listbox on a form to allow users to choose a record to edit

Platform:Visual Basic
Task:Setting up a listbox on a form to allow users to choose a record to edit
Discussion:
A listbox is a good tool for allowing users to choose which record they want to edit. To do this you need to set up the listbox to contain all the records to choose from as well as bind the listbox to a bindingsource so that choices drive the contents of the editing form. Set the listbox's datasource to the bindingsource and the displaymember to the text field you want to show up. Set the valuemember to the ID of the listbox item.
Example:
'none
Back to Index