combo下拉框 从access数据库中提取的数据怎么让重复项不显示
Private Sub Form_Load()
'变量声明
Dim db1 As Database '数据库变量类型
Dim rs1 As Recordset '记录集变量类型(像表一样)
Dim ss As String '存储SQL语句
'打开数据库 "mima.mdb"
Set db1 = DBEngine.Workspaces(0).OpenDatabase("C:\Users\zhangjian\Desktop\界面-张鉴\shebei.mdb")
'打开库中的表 "用户表" 记录集recordset
ss = "select * from 电机型号" 'SQL语句
Set rs1 = db1.OpenRecordset(ss, dbOpenDynaset)
Do Until rs1.EOF
Combo1.AddItem rs1("电机型号1").Value
rs1.MoveNext
Loop
End Sub