看下这段代码,datacb_UserName.BoundText这行哪错了??
On Error GoTo errmsgAdodc1.ConnectionString = "Provider=SQLOLEDB.1;Password=dbuser;Persist Security Info=True;User ID=dbuser;Initial Catalog=DBTest;Data Source=."
Adodc1.RecordSource = "select * from doc_users"
Adodc1.Refresh
If Adodc1.Recordset.EOF = False Then '如果用户为空则不执行默认选定
Adodc1.Recordset.MoveFirst
datacb_UserName.BoundText = Adodc1.Recordset.Fields("userID")
errmsg:
MsgBox "连接数据库出错"
End If
一到datacb_UserName.BoundText = Adodc1.Recordset.Fields("userID")这就出错,如果是赋值问题,它确实赋上了,而且起作用了啊