Dim cn As New ADODB.Connection Dim cn2 As New ADODB.Connection Dim n As Integer Option Explicit
Private Sub Command1_Click() If DataCombo1.Text = "" Then MsgBox "操作员不能为空,请选择!", vbOKCancel + vbExclamation, "登录验证" DataCombo1.SetFocus Else If DataCombo1.Text = Adodc2.Recordset.Fields("操作员") _ And Text1.Text = Adodc2.Recordset.Fields("操作口令") Then Unload Me Form2.Show End If End If End Sub Private Sub Form_Load() Set cn = New ADODB.Connection cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\ybgl.mdb" cn.Open Adodc1.ConnectionString = cn Adodc1.RecordSource = "select * from 用户表" Adodc1.CommandType = adCmdText Set DataCombo1.RowSource = Adodc1 DataCombo1.ListField = "操作员" End Sub 在运行的时候,说对象变量或with块变量未设置,调试的时候显示在上面的红色的部分有问题 请求帮助