⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formxgm.frm

📁 本人自己开发的超市管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FormXGM 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改密码"
   ClientHeight    =   3255
   ClientLeft      =   5730
   ClientTop       =   3030
   ClientWidth     =   4275
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3255
   ScaleWidth      =   4275
   Begin VB.CommandButton Command2 
      Caption         =   "取   消"
      Height          =   495
      Left            =   2520
      TabIndex        =   7
      Top             =   2400
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确   认"
      Default         =   -1  'True
      Height          =   495
      Left            =   480
      TabIndex        =   6
      Top             =   2400
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   1440
      TabIndex        =   2
      Top             =   1560
      Width           =   2415
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   1440
      TabIndex        =   1
      Top             =   960
      Width           =   2415
   End
   Begin VB.TextBox Text1 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   360
      Width           =   2415
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "确认密码:"
      Height          =   180
      Index           =   2
      Left            =   360
      TabIndex        =   5
      Top             =   1680
      Width           =   915
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "新密码:"
      Height          =   180
      Index           =   1
      Left            =   480
      TabIndex        =   4
      Top             =   1080
      Width           =   735
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "旧密码:"
      Height          =   180
      Index           =   0
      Left            =   480
      TabIndex        =   3
      Top             =   480
      Width           =   735
   End
End
Attribute VB_Name = "FormXGM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit


Private Sub command2_Click()
    
    Unload Me
    
End Sub

Private Sub Form_Load()
    
    Me.Caption = Me.Caption + "(当前操作员 - - " & mm & ")"
    
End Sub



Private Sub Command1_Click()
    
    Dim str As String

    If o = 0 Then
    
    If Text1.Text = nn Then
    
    If Text2.Text = Text3.Text Then
        str = "update dbo.M set M = '" & Text2.Text & "' where Y# = '" & mm & "';"
        J.Execute str
        MsgBox "修改成功!请劳记!", , "提示"
        o = 1
        Unload Me
    Else
        MsgBox "两次密码不相符合!", , "提示"
        Text2.SetFocus
        SendKeys "{Home}+{End}"
    End If
    
    Else
        MsgBox "原密码不对,你无权修改!"
        Text1.SetFocus
        SendKeys "{Home}+{End}"
    End If
    Exit Sub
    End If
    
    If o = 1 Then
        
        
    C2.ActiveConnection = x
    C2.CommandType = adCmdText
    C2.CommandText = "select 密码 from dbo.M where Y# ='" & mm & "';"
    R2.CursorLocation = adUseClient
    R2.Open C2, , adOpenDynamic, adLockReadOnly
    
    If Not R2.EOF Then
    nn = R2!M
    
    If Text1.Text = nn Then
    
    If Text2.Text = Text3.Text Then
        str = "update dbo.M set M = '" & Text2.Text & "' where Y# = '" & mm & "';"
        J.Execute str
        MsgBox "修改成功!请劳记!", , "提示"
        o = 1
        Unload Me
    Else
        MsgBox "两次密码不相符合!", , "提示"
        Text2.SetFocus
        SendKeys "{Home}+{End}"
    End If
    
    Else
        MsgBox "原密码不对,你无权修改!"
        Text1.SetFocus
        SendKeys "{Home}+{End}"
    End If
    End If
    
    
    
    
    End If
    
    
        
    
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -