下面的这段程序在执行的时候总是提示编译有错误,找不到方法或数据成员。
不晓得是怎么一回事,哪位大虾知道,请提示一下。谢谢!
Private Sub Cmd_OK_Click()
Dim NameKey As Single
Dim PasswordKey As Single
NameKey = txtUser
PasswordKey = txtPwd
'判断用户是否存在
If MyUser.In_DB(NameKey) = False Then
MsgBox "用户名不存在"
Try_times = Try_times + 1
If Try_times >= 3 Then
MsgBox "您已经三次尝试进入本系统,均不成功,系统将关闭"
DBapi_Disconnect
End
Else
Exit Sub
End If
End If
'判断密码是否正确
MyUser.GetInfo (NameKey)
If MyUser.UserPwd <> PasswordKey Then
MsgBox "密码错误"
Try_times = Try_times + 1
If Try_times >= 3 Then
MsgBox "您已经三次尝试进入本系统,均不成功,系统将关闭"
DBapi_Disconnect
End
Else
Exit Sub
End If
End If
'登录成功,将当前用户的信息保存在CurUser中
CurUser.GetInfo (MyUser.UserName)
'关闭登录对话框
Unlode Me
End Sub
不晓得是怎么一回事,哪位大虾知道,请提示一下。谢谢!
Private Sub Cmd_OK_Click()
Dim NameKey As Single
Dim PasswordKey As Single
NameKey = txtUser
PasswordKey = txtPwd
'判断用户是否存在
If MyUser.In_DB(NameKey) = False Then
MsgBox "用户名不存在"
Try_times = Try_times + 1
If Try_times >= 3 Then
MsgBox "您已经三次尝试进入本系统,均不成功,系统将关闭"
DBapi_Disconnect
End
Else
Exit Sub
End If
End If
'判断密码是否正确
MyUser.GetInfo (NameKey)
If MyUser.UserPwd <> PasswordKey Then
MsgBox "密码错误"
Try_times = Try_times + 1
If Try_times >= 3 Then
MsgBox "您已经三次尝试进入本系统,均不成功,系统将关闭"
DBapi_Disconnect
End
Else
Exit Sub
End If
End If
'登录成功,将当前用户的信息保存在CurUser中
CurUser.GetInfo (MyUser.UserName)
'关闭登录对话框
Unlode Me
End Sub
改成
call CurUser.GetInfo (MyUser.UserName)
或
MyUser.GetInfo NameKeycall CurUser.GetInfo (MyUser.UserName)
或
CurUser.GetInfo MyUser.UserName