你有什麽方法讀出來得,就用什麽.databind(),之前先清空一下,就搞定了
Private Sub FindFormInit()
Adodc1.ConnectionString = connstring
'combo1设置-----------------------------------
strsql = "select 略。。。。"
Adodc1.RecordSource = strsql
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
Combo1(0).AddItem Adodc1.Recordset.Fields(0)
Combo1(12).AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Loop
Else
' MsgBox "", vbCritical
End If
(中间还有很多。。省略了吧。。。)
strsql = "select 略。。。"
Adodc1.RecordSource = strsql
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
Combo1(1).AddItem Adodc1.Recordset.Fields(0)
Combo1(13).AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Loop
Else
' MsgBox "", vbCritical
Exit sub
End If
End sub
'添加按钮设置-----------------------------------
Adodc1.ConnectionString = connstring
strsql = "SELECT 略。。。"
Adodc1.RecordSource = strsql
Adodc1.Refresh
Adodc1.Recordset.AddNew
For i = 0 To 10
Adodc1.Recordset.Fields(i) = Text1(i).Text
Next i
Adodc1.Recordset.Update
'我是这样更新的:(其实就是把下拉菜单代码又写了一遍。。。OTZ......)
Adodc1.ConnectionString = connstring
strsql = "select 略。。。"
Adodc1.RecordSource = strsql
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
Combo1(0).AddItem Adodc1.Recordset.Fields(0)
Combo1(12).AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Loop
Else
' MsgBox "", vbCritical
End If
'后面的。。。略了吧。。。
End sub