Folks: this is a very small part of my code.. i have 2 comboboxes filled with RAM values(integers). by using the "nothing" keyword i just want to make sure that both the combo boxes have some values filled in them..

say i choose 1 from combobox1 and 2 from combobox2.. i hit click.. i get the required result..

but if i left the value on combobox2 as it is and changed combobox1's value to 0.5, i get the msg "please enter 2 values".. how can i tell the program that..when 2 values are there..go ahead..and execute..! ???

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

Dim con As OleDbConnection = New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=\\rde-fileserve\CAD\Copy of USERS for RAM.mdb")

Dim cmd1 As New OleDbCommand


If (ComboBox6.SelectedItem = Nothing) Or (ComboBox7.SelectedItem = Nothing) Then

MsgBox(" Please choose 2 values")

Exit Sub
10 Years
Discussion Span
Last Post by asnider
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.