[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

check if combo box has selection vb.net

Posted on 2016-08-01
5
Medium Priority
?
518 Views
Last Modified: 2016-08-01
i have 3 combo boxes on a form  in vb.net. the 3rd combo needs the selection from both of the previous. How do i check that both cb1 and 2 have items selected?
there is no order of selection the user can change 1 or 2 in either order as long as i can make cb3 respond
0
Comment
Question by:PeterBaileyUk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:PeterBaileyUk
ID: 41737456
I just wrote this
  If (String.IsNullOrEmpty(CBNote.SelectedItem)) And (String.IsNullOrEmpty(CBScaleType.SelectedItem)) Then
            Call GetCBData("usp_GetChords")
        End If

not sure if its correct way
0
 

Author Comment

by:PeterBaileyUk
ID: 41737457
apart from the blinding obvious that i need an else and need to move the call to the correct part
0
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 41737468
You can use the ComboBox.SelectedIndex property to know if a item has been selected in the ComboBox. It returns the zero base index of the selected item or if no item has been selected -1.
0
 

Author Closing Comment

by:PeterBaileyUk
ID: 41737472
I did try and ceremoniously failed. thx again
0
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 41737474
Did you get it working?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question