List Box - getting selected data

  • Thread starter Thread starter Flannel
  • Start date Start date
F

Flannel

I have a list box with only one column (the data is a text
string). If I select an item in the list box, how can I
grab the text string from the selected item? I need to get
just the selected text string for use in another area of
the form.

It seems like this should be pretty simple, but I'm not
getting it. Thank you.
 
If your listbox is called "lstMyListBox", then the following code grabs its
value and sticks it into a textbox on the same form:
Me!txtMyTextBox = Me!lstMyListBox

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
I can't believe I didn't just try that. Thank you. Here's
another question working on this same situation. How can
you grab the value of an unbound column from the selected
record in the list box? So this would be a scenario when
there is more then one column in the list box.
 
Back
Top