Getting a value from a list box and putting on another form?

  • Thread starter Lee Taylor-Vaughan
  • Start date
L

Lee Taylor-Vaughan

Hello

I am wanting to know, how i get a text value/s, of selected row/s, from a
list box on one form, and
when a button is clicked the selected text/value goes to another control (a
memo field)
on a different form.

the list box displays (on frmTwo) is a list of missing information, and pops
up after a user has selected "incomplete information" on frmOne. The user
selects each item and then clicks a button to continue. (multi-select
property is set to true).

Please help..

Thanks
 
R

Rob Oldfield

Dim itm As Variant, str As String
str = ""
For Each itm In Me.ctlList.ItemsSelected
str = str + Me.ctlList.ItemData(itm) + ", "
Next
If str <> "" Then
str = Left(str, Len(str) - 2) 'chop off trailing ,
End If
Forms!frmTwo!Whatever = str
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top