473,804 Members | 3,762 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 3630
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
2423
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
6697
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
14752
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
19331
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
9388
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
4800
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
12693
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
2755
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
6803
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
10571
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10326
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
10317
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,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2990
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.