求企业考勤管理系统VB+ACCESS 30
也可以帮忙看看这段代码'*************************************************************************...
也可以帮忙看看这段代码
' ******************************************************************************
'过程名:cboDataUser
'说 明:为用户名列表赋值
'参 数:无
'返回值:无
' ******************************************************************************v
Public Sub cboDataUser()
Dim res As String
Dim txtsql As String
Dim rstcbo As New ADODB.Recordset
Dim i As Integer
txtsql = "select UserId from tbUser"
res = ExecuteSQL(txtsql, rstcbo, False)
If rstcbo.RecordCount <> 0 Then
cboLogin.Clear
rstcbo.MoveFirst
For i = 0 To rstcbo.RecordCount - 1
cboLogin.AddItem (rstcbo.Fields(0))
If Not rstcbo.EOF Then rstcbo.MoveNext
rstcbo.MoveNext
Next
End If
End Sub
显示:实时错误'3704'
对象关闭时,不允许操作
怎么修改呢? 展开
' ******************************************************************************
'过程名:cboDataUser
'说 明:为用户名列表赋值
'参 数:无
'返回值:无
' ******************************************************************************v
Public Sub cboDataUser()
Dim res As String
Dim txtsql As String
Dim rstcbo As New ADODB.Recordset
Dim i As Integer
txtsql = "select UserId from tbUser"
res = ExecuteSQL(txtsql, rstcbo, False)
If rstcbo.RecordCount <> 0 Then
cboLogin.Clear
rstcbo.MoveFirst
For i = 0 To rstcbo.RecordCount - 1
cboLogin.AddItem (rstcbo.Fields(0))
If Not rstcbo.EOF Then rstcbo.MoveNext
rstcbo.MoveNext
Next
End If
End Sub
显示:实时错误'3704'
对象关闭时,不允许操作
怎么修改呢? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询