马上给分!!!再线等待~~

jdiwx 2003-05-21 08:36:31
谁有 密码登陆窗体的代码,后台用ACCESS
...全文
62 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
axiulisa 2003-05-22
  • 打赏
  • 举报
回复
AXIULISA@163.COM
axiulisa 2003-05-22
  • 打赏
  • 举报
回复
留个EMail。我这里刚好有一个,我可以发一个给你了!
KJ_Wang 2003-05-22
  • 打赏
  • 举报
回复
给你一个:
Option Explicit

Dim LoginTimes As Integer

Private Sub CmdCancel_Click()
End
End Sub

Private Sub CmdOK_Click()
Dim RsUserID As New ADODB.Recordset
Set RsUserID = Cnn.Execute("select * from SysUser where sysuserid='" & Trim(TxtUserName.Text) & "'")
If LoginTimes > 3 Then
MsgBox "你已经输入系统三次了,你不是本系统的用户,请不要再试了。"
End
End If
If RsUserID.EOF Then
LoginTimes = LoginTimes + 1
MsgBox "没有这个用户!", vbExclamation, "美容专家连锁店管理系统"
Exit Sub
Else
RsUserID.Find "Password='" & Trim(TxtPassword.Text) & "'"
If RsUserID.EOF Then
MsgBox "你的密码错误,请重新输入!", vbExclamation, "美容专家连锁店管理系统"
LoginTimes = LoginTimes + 1
Exit Sub
Else
MDIFrmMain.Show
Unload Me
End If
End If
End Sub

Private Sub Form_Load()
LoginTimes = 0
End Sub

Private Sub TxtPassword_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
CmdOK_Click
End If
End Sub

Private Sub TxtUserName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtPassword.SetFocus
End If
End Sub
Intelement 2003-05-21
  • 打赏
  • 举报
回复
VB 里面有的
你参照一下吧

Project | Add Form |
Log in Dialog
ODBC Log in

1,217

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧