运行时出现错误,缺少数组?
Private Function CheckData() As Boolean
Dim rst As ADODB.Recordset
If (Trim(txtUserId.Text) = "") Then
MsgBox ("用户ID不能为空!")
CheckData = False
Exit Function
ElseIf Len(Trim(txtUserId.Text)) <> 6 Then
MsgBox ("用户ID不是6位!")
CheckData = False
Exit Function
ElseIf Len(Trim(txtName.Text)) <> 6 Then
MsgBox ("密码不能少与6位!")
CheckData = False
Exit Function
ElseIf (Trim(Text3.Text) = "") Then
MsgBox ("个人认证码不能为空!")
CheckData = False
Exit Function
End If
If Not txtName.Text = txtname2.Text Then
MsgBox "两次密码输入不同!"
End If
SQL = " select id from s where id='" & Trim(txtUserId.Text) & "'"
Set rst = SelectSQL(SQL, msg)
If flag = "Add" And rst.RecordCount > 0 Then
MsgBox ("该用户已存在!")
rst.Close
CheckData = False
Exit Function
End If
CheckData = True: MsgBox "注册成功!"
End Function
错误停留在SelectSQL,请问是什么问题呢?