Dim cmd As New SQLCommand cmd.C Dim lst As WinForm.ComboBox Dim dt As DataTable cmd.CommandText = "Select 床位 From [住院登记] where 出院结账 = False" dt = cmd.ExecuteReader() lst = e.Form.Controls("ComboBox1") lst.Items.clear If dt.datarows.count >0 Then For Each dr As Datarow In dt.Datarows if dr("床位") IsNot Nothing Then lst.Items.Add(dr("床位")) End If Next End If