473,809 Members | 2,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiselect List Boxes Validation Problem

28 New Member
Hai Friends..

I have a search page and contains multiple multiselect list boxes, each containing 6 options. I want to check whether the user has checked atleast one option in each of those list boxes at the time the user clicking the Search button. How do i validate this .

Thanks in advance...
Jul 24 '07 #1
1 1821
gits
5,390 Recognized Expert Moderator Expert
hi ...

you have to loop through you 'multiple-selects' and check every one of them for

Expand|Select|Wrap|Line Numbers
  1. list_ref.selectedIndex != -1
the selectedIndex gives you the index of the first selected option in a list ... when nothing is selected the value of selectedIndex is -1.

kind regards
Jul 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
10848
by: adam.lock | last post by:
Hi I have a form which has 10 list boxes on it, each with a select option with values 0 to 3. Once the user submits the form, I want to validate that only three of the list boxes have been selected and the total value is equal to 6, else they get an alert message. The validation is performed on an asp page. Would appreciate some help as I am lost with js!!
1
5031
by: Danny | last post by:
I like the combo box because you can scroll through items nicely, but the list box just has the navigation where you can go up and down. I am trying to allow the user to multiselect items. With the list box, he does not like it because if he clicks on the nav bar, it loses the selection!! even if he holds down the shift. Is there a way to do this with a combo box? I just see the multi select for the list box. Thanks in advance
3
2589
by: Shannan Casteel via AccessMonster.com | last post by:
I have three main tables. The first is the table that my main form will be based on. This is where the user will enter all the data. The table is called TechnicalProblemsTable. It looks like this: I can't fit it on the screen, so I'll just list the field headings vertically. CaseNumber-pk SolutionNumber Date
1
1985
by: tod4 | last post by:
Hi, My problem: I have query with value klient and product. On my form Im using multiselect box as filter of klient value. Now I would like to use second multiselect on this form for product value selection but only for those value that are filtered by first multiselect. I dont know how to connect selected value klient from first multiselect and value product from query and make it source of multiselect 2. Maybe someone did it before...
0
1061
by: - HAL9000 | last post by:
Was/Is there a resolution to this bug of using ListView check boxes and MultiSelect together? I have the same difficulty as the author. http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb/browse_frm/thread/76d2a0afe3aa93e5/c4d60764a0f3d62c?q=Multiselect+FullRowSelect+checkboxes#c4d60764a0f3d62c Title of newsgroup thread was "listview with checkboxes!Urgent" on July 5 of 2002.
2
1956
by: Steph | last post by:
I have created a multiselect list box control (lbx_comorb) that is populated from a datatable (dt_ptAdmission). The list box populates now problem at all. However the issue is when I load the webform, when there is already admission data. I need the populated list box (lbx_comorb) to show the items that were previously selected for this admission. The selected comorb data is stored in another datatable (dt_ptComorb). If anyone can...
5
2884
by: doncee | last post by:
Please point me in the direction of some good, free web based resources\ documentation for information on developing the multi select list boxes. Have made extensive use of the non-multi list boxes in the past but am having problems locating good info for writing code & using the multi select boxes. BTW am using acc '97. Thanks for your input. dc
3
3631
by: kaosyeti via AccessMonster.com | last post by:
hey... i have an unbound multiselect listbox on a form that i want to use to populate text boxes on that form. so if a user selects the 3rd item in a list of 20, how can i have that item show up in a text box? then, how can i have a second selected item show up in a different text box, without affecting the 1st one? (lboxOptions, txtboxOptions0, txtboxOptions1, etc..) -- Greg Message posted via AccessMonster.com
1
1792
by: Redbeard | last post by:
I am a newbie running Access 2003. A couple of weeks back a member named ADezil help me write a code that let a , MultiSelect Listboxs that run a Query on a Form (many thanks). I have used this code so much that I am trying to expand it to run off more then one list box. However I can’t get it to work. Original code is below. Private Sub PhotoSearch1_Click() Dim strOr As String Dim strDoc As String Dim varSelect As Variant Dim ctl...
0
9721
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
9600
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
10376
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
10375
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
10114
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
9198
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...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
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

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.