标题:[求助]附加前面的代码
取消只看楼主
kevinsg
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2005-4-5
 问题点数:0 回复次数:0 
[求助]附加前面的代码

Private Sub Command1_Click() With Adodc1.Recordset .MoveFirst Do While Not .EOF On Error Resume Next If .Fields("yonghuming") = Text1.Text And .Fields("mima") = Text2.Text Then gwkh = .Fields("gukh") ''''管理员是没有购物卡号的,所以上面出错跳到下一条 dengluming = Trim(Text1.Text) mima = Text2.Text Exit Do End If .MoveNext Loop If Not .EOF Then MsgBox "欢迎您的使用", vbOKOnly, "通过验证" If denglu = "guanliyuan" Then MDIForm1.menuglcz.Visible = True Else MDIForm1.menuptcz.Visible = True End If MDIForm1.menutd.Visible = True MDIForm1.menu1.Visible = False MDIForm1.menudenglu.Visible = False MDIForm1.Toolbar1.Buttons.Remove 1 MDIForm1.Toolbar1.Buttons.Remove 1 dengluming = Text1.Text Unload Me Else MsgBox "您输入的用户名或密码出错了", vbOKOnly, "无法通过验证" Text2.Text = "" Text2.SetFocus End If End With End Sub

Private Sub Command2_Click() MDIForm1.menudenglu.Visible = True denglu = "" Unload Me End Sub

Private Sub Form_Activate() frmdenglu.Left = 2200 frmdenglu.Top = 1500 Adodc1.Refresh End Sub

Private Sub Form_Load() Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\vbdata\vbdata.mdb;Mode=ReadWrite" Adodc1.CommandType = adCmdTable If denglu = "guanliyuan" Then Adodc1.RecordSource = "guanliyuan" Me.Caption = "管理员登陆窗体" Else Adodc1.RecordSource = "putongyonghu" Me.Caption = "普通用户登陆窗体" End If End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If dengluming = "" Then Command2_Click End If Call remdi End Sub

Private Sub Label3_Click()

End Sub

搜索更多相关主题的帖子: 代码 
2005-04-19 13:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-16094-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.715591 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved