Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / December 2005

Tip: Looking for answers? Try searching our database.

Addressing columns in Multilist Select listbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark A. Sam - 16 Dec 2005 16:57 GMT
Hello,

Iterating through a listbox, I need to address the columns of the list and
put them into a table.  Is this possible?  The expression
ctlList.ItemData(varItem) will give me Column(0), where I need other column
data as well.

Thanks and God Bless,

Mark A. Sam
Marshall Barton - 16 Dec 2005 19:50 GMT
>Iterating through a listbox, I need to address the columns of the list and
>put them into a table.  Is this possible?  The expression
>ctlList.ItemData(varItem) will give me Column(0), where I need other column
>data as well.

Mark, check out the .Column property

Signature

Marsh
MVP [MS Access]

Mark A. Sam - 16 Dec 2005 20:25 GMT
Marshall,

I looked at the help for the Column Property and don't see how it applies to
multiple list box selections.

God Bless,

Mark

> >Iterating through a listbox, I need to address the columns of the list and
> >put them into a table.  Is this possible?  The expression
> >ctlList.ItemData(varItem) will give me Column(0), where I need other column
> >data as well.
>
> Mark, check out the .Column property
Douglas J. Steele - 16 Dec 2005 21:08 GMT
You should be able to use something along the lines of:

Sub BoundData()
Dim frm As Form, ctl As Control
Dim varItm As Variant

Set frm = Forms!Contacts
Set ctl = frm!Names
For Each varItm In ctl.ItemsSelected
 Debug.Print ctl.Column(0, varItm)
 Debug.Print ctl.Column(1, varItm)
 Debug.Print ctl.Column(2, varItm)
Next varItm
End Sub

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Marshall,
>
[quoted text clipped - 14 lines]
>>
>> Mark, check out the .Column property
Mark A. Sam - 16 Dec 2005 23:12 GMT
Thank you Doug.

> You should be able to use something along the lines of:
>
[quoted text clipped - 29 lines]
> >>
> >> Mark, check out the .Column property
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.