Office中国论坛/Access中国论坛

标题: [求助]关于登录校验系统 [打印本页]

作者: chips83    时间: 2009-8-16 01:09
标题: [求助]关于登录校验系统
Private Sub CommandButton1_Click()
If Forms.TextBox1.Value = "陈伟" And Forms.TextBox2.Value = "sxcw1115" Then GoTo workSheet2 Activate Else MsgBox "用户名或密码错误,请重新输入"

End Sub

CommandButton1为登录按钮,TextBox1为用户名,TextBox2为密码
我要实现用户名和密码正确,就跳转到SHEET2,用户名和密码错误,跳出提示框,焦点回到TextBox1并清空TextBox1及TextBox2数据,如何实现,谢谢。我是初学什么都不懂。请指导。




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3