展开全部
Dim i As Integer
On Error Resume Next
i = 0
Combo1.Clear
Set MDBData = Nothing
Set rs = Nothing
Set MDBData = Workspaces(0).OpenDatabase("数据库路径")
Set rs = MDBData.OpenRecordset("table1")
If rs Is Nothing Then
MsgBox "打开数据表称错误!"
Exit Sub
End If
rs.MoveFirst
Do While Not rs.EOF
i = i + 1
......
rs.MoveNext
Loop
SettingFlag = False
Frame2.Enabled = False
On Error Resume Next
i = 0
Combo1.Clear
Set MDBData = Nothing
Set rs = Nothing
Set MDBData = Workspaces(0).OpenDatabase("数据库路径")
Set rs = MDBData.OpenRecordset("table1")
If rs Is Nothing Then
MsgBox "打开数据表称错误!"
Exit Sub
End If
rs.MoveFirst
Do While Not rs.EOF
i = i + 1
......
rs.MoveNext
Loop
SettingFlag = False
Frame2.Enabled = False
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询