how to link or bind a listbox to textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a address book that has a master list of all the names in a listbox
with textboxes showing individual names and info. I want to be able to click
on the name in the listbox and have all that individual's info show up on the
form or if you have someother way to do this Thats fine also... I like the
k.i.s.s. method best.
 
You have few options
1. on each field write to which column in the list box it bounded. the
recordsource for the list box will combain all the records you need
"select Name,Address,Phone From MyTable"
bound each field to its place in the list
Name Text box control source = me.listbox.column(0)
Address Text box control source = me.listbox.column(1)
Phone Text box control source = me.listbox.column(2)
etc
2. on the after update event of the list box you can assign value to the
text box.
me.name = me.list.column(0)
me.Address= me.list.column(1)
me.Phone= me.list.column(2)
 
Back
Top