473,699 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get multiple values from Listbox with Multi Select property set to Simple

Hi All,
I'm trying to get value from Listbox where Multi Select property is
set to Simple, meaning multiple values can be selected.
Doing regular loop like following, retuns NULL value for each data
item.
=============== =============== ============
lCount = Me!lstProblemTy pe.ListCount
For varItem = 0 To lCount
If Me!lstProblemTy pe.Selected(var Item) = True Then
strDescr = strDescr & "," &
Trim(Me!lstProb lemType.ItemDat a(varItem))
End If
Next
=============== =============== ============
Please advice if you have any expirience.

Regards...
Nov 12 '05 #1
1 3614
NYprmr wrote:
Hi All,
I'm trying to get value from Listbox where Multi Select property is
set to Simple, meaning multiple values can be selected.
Doing regular loop like following, retuns NULL value for each data
item.
=============== =============== ============
lCount = Me!lstProblemTy pe.ListCount
For varItem = 0 To lCount
If Me!lstProblemTy pe.Selected(var Item) = True Then
strDescr = strDescr & "," &
Trim(Me!lstProb lemType.ItemDat a(varItem))
End If
Next
=============== =============== ============
Please advice if you have any expirience.

Regards...

I usually use ItemsSelected. Air code
Dim var As Variant
Dim strDesc As String
For each var in Me.ListBoxName. ItemsSelected
'specify column, row. In this case, column zero
strDesc = strDesc & Me.ListBoxName. Column(0,var)
Next

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2411
by: PW | last post by:
I use a multi-select menu in an ASP so the user can pick several values. <select multiple name="lbErrorType" size="12"> However, after I have saved the records to the DB, and the user comes back to edit a prior record, I re-populate the multiple select box and do a "<option selected>" for each record that is saved to the DB. <option selected>
3
6692
by: Terri | last post by:
Hi, I'm using the following code to build a concatenated string from a multi-select combo. For Each varItem In Forms!frmreports!Combo1.ItemsSelected strSQL = strSQL & Forms!frmreports!Combo1.ItemData(varItem) & " OR =" Next varItem
1
469
by: NYprmr | last post by:
Hi All, I'm trying to get value from Listbox where Multi Select property is set to Simple, meaning multiple values can be selected. Doing regular loop like following, retuns NULL value for each data item. ========================================== lCount = Me!lstProblemType.ListCount For varItem = 0 To lCount If Me!lstProblemType.Selected(varItem) = True Then strDescr = strDescr & "," &
2
14743
by: Zlatko Matiś | last post by:
Hello. How to reference selected values from a multi-select list box, as a criteria in a query ? Is it possible at all? Regards, Zlatko
1
19326
by: ykong1214 | last post by:
In my project, there is a single select tag, <html:select property="userName" size="7"> <html:options collection="UserList" property="value" labelProperty="label" /> </html:select> <br><br> <input type="button" value="Select" onClick="go()">&nbsp;&nbsp;&nbsp; <input type="button" value="Cancel" onClick="cancel()"> when user choose any one and click "select" button, the value will be transfered to original window:
1
9381
by: Mitesh | last post by:
Hi, I have the following HTML code right now. Code: ------------------------------------------------------------------------------------------------------------------------- <td width="20%"><SELECT NAME="cfg_input_global_report_types" MULTIPLE > <OPTION VALUE="BU" >Option1 <OPTION VALUE="BP" >Option2
3
4794
by: shara | last post by:
Hello there, I want to pass multiple values selected in a select box(HTML) to another php page.I tried doing in several ways but of no use.Can anybody please help me with this. The code i used is in page 1 is: <td align="left"> <select multiple name='srtestrun' style='width:300px;' size='10' > <?php
6
12684
by: Craggy | last post by:
Is it possible to adjust the multi select property of a list box using VBA? my initial thaught would be Me.List43.multi select = simple but this produces an error.
2
2745
by: woodey2002 | last post by:
Hi Guys and thanks for your time. I have a search form for my database that allows users to select multiple criteria from multi select list boxes. I successfully integrated a multi select listbox for users to select and search for counties. On the same page however I would like to integrate a similar multiselect box for nationality. I would like the user to be able to search for nationality with county or individually. After...
1
6796
by: woodey2002 | last post by:
Hi Everyone and many thanks for your time.. I am trying to begin access and a bit of VBA i am enjoying it but I have a annoying problem I just canít get any where on. My databse mostly includes bits of code for different examples. I have one last thing to finish. I am trying to create a search form that will allow users to select criteria from multiple sources eg ,multi select list boxes , combo boxes. I have a subform showing all the...
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9034
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Duprť who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.