-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How 'bout this:
==== begin code ====
dim lst as listbox
dim str as string
dim i as integer
set lst = Me!ListBox_Name
for i = 0 to lst.listcount
str = str & lst.column(1,i) & ","
next i
' get rid of the trailing comma
str = left$(str,len(str)-1)
Me!TextBox_name = str
===== end code ====
Syntax of .Column(): .Column(index, row)
Therefore, .Column(1,i) means pull the value of the 2 column (the index
is a zero-based index) on the row indicated by i.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQRwG+oechKqOuFEgEQLQnwCg/AJ2MOdJYARYPtyLxSL0yiq/dOMAoN4+
OJweR9TpXM9OTIswC0IEuoLA
=lEVD
-----END PGP SIGNATURE-----
dixie wrote:
I have a list box that has a list of ID numbers for people. The box
actually shows their names though. I want to take this list and
programmatically put it into a text box on the same form in the format,
'Name1, Name2, Name3, Name4, etc.'.
How do I take the contents of the list box and programmatically add it into
the text box in that format?