Label1.Text = ComboBox1.GetItemText(ComboBox1.SelectedItem) Label2.Text = "ComboBox1.GetItemText(ComboBox1.SelectedItem)" '下記は VB2015 以降限定 'Label3.Text = $"{ComboBox1.SelectedItem}" 'Label4.Text = $"{ComboBox1.GetItemText(ComboBox1.SelectedItem)}"
Dim adapter1 As New SqlDataAdapter("SELECT [ID], [所在], [種類] FROM [Table] WHERE Item Like N'%" & TextBox1.Text & "%'", cnn) Dim adapter2 As New SqlDataAdapter("SELECT [ID], [所在], [種類] FROM [Table] WHERE ID Like N'%" & TextBox1.Text & "%'", cnn) Dim adapter3 As New SqlDataAdapter("SELECT [ID], [所在], [種類] FROM [Table] WHERE " & ComboBox1.GetItemText(ComboBox1.SelectedItem) & " Like N'%" & TextBox1.Text & "%'", cnn)