Populating a Listbox with the Contents of a Field from a MDB
I need to populate a listbox with the contents of a field in a recordset of a MDB file. When the user clicks on one of the items in the list i need all the textboxes to be populated with thier fields in the same recordset.
Example: I have 15 textboxes, each one has the info of the 15 fileds in TblLetters. Field1 holds the names of the letters so it is named "Names". Well, i want to populate a listbox with all the "Names" and then when the user clicks on a Name the 15 textboxes are filled with thier coesponding Fields.
Any help is appreciated.
Re: Populating a Listbox with the Contents of a Field from a MDB
Quote:
Originally posted by Arc
I need to populate a listbox with the contents of a field in a recordset of a MDB file. When the user clicks on one of the items in the list i need all the textboxes to be populated with thier fields in the same recordset.
Example: I have 15 textboxes, each one has the info of the 15 fileds in TblLetters. Field1 holds the names of the letters so it is named "Names". Well, i want to populate a listbox with all the "Names" and then when the user clicks on a Name the 15 textboxes are filled with thier coesponding Fields.
Any help is appreciated.
Hello.....
Its so cool cool
Populate the list as in above reply
then
in List1_Click Event write this
if ur using ADO
Dim rsDisplayValues As New ADODB.Recordset ''For Displaying the values from table
rsDisplayValues.Open "Select * from <Tablenmae> " & _
"Where Name='" & list1.text & "' ", CnAccess, adOpenStatic, adLockOptimistic
Try and reply
Itty