vb 发现二义性的名称"Command1_Click()"?怎么改这段程序?
PrivateSubCommand1_Click()OnErrorResumeNextDimuserAsStringDimpasswordAsStringDimpwAsS...
Private Sub Command1_Click()
On Error Resume Next
Dim user As String
Dim password As String
Dim pw As String
Frame1.Visible = True
Frame2.Visible = False
user = Text1.Text
password = Text2
If Text1.Text <> "" And Text2.Text <> "" Then
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select password from 用户信息 where username = '" & user & "'"
Adodc1.Refresh
pw = Adodc1.Recordset(0)
If Text3.Text = yzm1 Then
If password = pw Then
Form1.Show
Unload Me
Else
If max >= 3 Then
MsgBox "您无权使用该软件!!", vbOKOnly + vbExclamation, "提示"
Unload Me
Else
MsgBox "用户或密码错误!!", vbOKOnly + vbExclamation, "提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Call yzm
max = max + 1 '
End If
End If
Else:
MsgBox "验证码错误!!", vbOKOnly + vbExclamation, "提示"
Text3.Text = ""
Text3.SetFocus
Call yzm
End If
Else:
MsgBox "用户和密码不能为空!!", vbOKOnly + vbExclamation, "提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Call yzm
End If
End Sub 展开
On Error Resume Next
Dim user As String
Dim password As String
Dim pw As String
Frame1.Visible = True
Frame2.Visible = False
user = Text1.Text
password = Text2
If Text1.Text <> "" And Text2.Text <> "" Then
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select password from 用户信息 where username = '" & user & "'"
Adodc1.Refresh
pw = Adodc1.Recordset(0)
If Text3.Text = yzm1 Then
If password = pw Then
Form1.Show
Unload Me
Else
If max >= 3 Then
MsgBox "您无权使用该软件!!", vbOKOnly + vbExclamation, "提示"
Unload Me
Else
MsgBox "用户或密码错误!!", vbOKOnly + vbExclamation, "提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Call yzm
max = max + 1 '
End If
End If
Else:
MsgBox "验证码错误!!", vbOKOnly + vbExclamation, "提示"
Text3.Text = ""
Text3.SetFocus
Call yzm
End If
Else:
MsgBox "用户和密码不能为空!!", vbOKOnly + vbExclamation, "提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Call yzm
End If
End Sub 展开
3个回答
展开全部
那个不是程序的问题,是你的代码中还有Command1_Click()这个函数的存在,找到他,删除就好
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
发现二义性的名称
表示相同作用域里有两个或以上的同名过程,VB6不支持重载,请查找过程的名称,删除或改名重复的过程
表示相同作用域里有两个或以上的同名过程,VB6不支持重载,请查找过程的名称,删除或改名重复的过程
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询