各位大神,求代码,如何在combo控件不显示重复的内容啊?
Private Sub Cbowenshu_GotFocus()m_recordset.Open "select * from songdaleixing where wenshu = '调查报告'", m_dbConnection, adOpenKeyset, adLockOptimistic
Cbowenshu.Clear
If m_recordset.RecordCount = 0 Then
MsgBox "没有记录,请核对清楚!", vbInformation, "错误"
End If
While Not m_recordset.EOF
Cbowenshu.AddItem m_recordset.Fields("leixing")
m_recordset.MoveNext
Wend
m_recordset.Close
End Sub