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

📄 main_mmxg.frm

📁 客户管理系统 对客户的信息进行管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form main_mmxg 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "系统设置-〖密码设置〗"
   ClientHeight    =   3195
   ClientLeft      =   2715
   ClientTop       =   3690
   ClientWidth     =   5775
   Icon            =   "main_mmxg.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3195
   ScaleWidth      =   5775
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Caption         =   "Frame1"
      Height          =   1320
      Left            =   -240
      TabIndex        =   5
      Top             =   2280
      Visible         =   0   'False
      Width           =   1425
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   "E:\明日vb编程500例\实用程序10例\客户管理系统\jdgl.mdb"
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   345
         Left            =   195
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   "ma"
         Top             =   855
         Visible         =   0   'False
         Width           =   1140
      End
      Begin VB.TextBox czy 
         DataField       =   "操作员"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   75
         TabIndex        =   7
         Top             =   195
         Width           =   1140
      End
      Begin VB.TextBox ma 
         DataField       =   "密码"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   75
         TabIndex        =   6
         Top             =   480
         Width           =   1140
      End
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FF8080&
      Caption         =   "退出"
      Height          =   405
      Left            =   3030
      TabIndex        =   4
      Top             =   2355
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      BackColor       =   &H00FFC0C0&
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1665
      Width           =   2340
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00FFC0C0&
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1260
      Width           =   2340
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00FFC0C0&
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   2040
      TabIndex        =   1
      Top             =   840
      Width           =   2340
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FF8080&
      Caption         =   "确定"
      Height          =   405
      Left            =   1290
      TabIndex        =   0
      Top             =   2355
      Width           =   1575
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "新密码"
      Height          =   255
      Left            =   1200
      TabIndex        =   11
      Top             =   1750
      Width           =   735
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "源密码"
      Height          =   255
      Left            =   1200
      TabIndex        =   10
      Top             =   1320
      Width           =   735
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "操作员"
      Height          =   255
      Left            =   1200
      TabIndex        =   9
      Top             =   900
      Width           =   645
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请输入操作员代号、原密码和新密码"
      Height          =   360
      Left            =   1335
      TabIndex        =   8
      Top             =   330
      Width           =   2985
   End
End
Attribute VB_Name = "main_mmxg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 frm_main.StatusBar1.Panels(1) = Me.Caption
 Data1.DatabaseName = App.Path & "\khgl.mdb"
End Sub
Private Sub Form_Unload(Cancel As Integer)
 frm_main.Enabled = True
 frm_main.StatusBar1.Panels(1) = "长春市明日科技有限责任公司"
End Sub

Private Sub Label3_Click()

End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Text2.SetFocus
  End If
  If KeyCode = vbKeyDown Then
     Data1.RecordSource = "select * from ma where (ma.操作员  like '%" + Text1.Text + "%')"
     Data1.Refresh
     Text2.SetFocus
  End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Text3.SetFocus
  End If
  If KeyCode = vbKeyUp Then
     Text1.SetFocus
  End If
  If KeyCode = vbKeyDown Then
     Data1.RecordSource = "select * from ma where (ma.密码  like '%" + Text2.Text + "%')"
     Data1.Refresh
     Text3.SetFocus
  End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Command1.SetFocus
  End If
  If KeyCode = vbKeyUp Then
     Text2.SetFocus
  End If
  If KeyCode = vbKeyDown Then
     Command1.SetFocus
  End If
End Sub
Private Sub Command1_Click()
Call main
  Dim MESSAGE As String
  Data1.RecordSource = "select * from ma where (ma.操作员='" + Text1.Text + "' and ma.密码='" + Text2.Text + "')"
  Data1.Refresh
   If Data1.Recordset.RecordCount > 0 Then
      Set adoRs = adoCon.Execute("update ma set 密码='" + Text3.Text + "' where 操作员='" + Text1.Text + "'")
      MsgBox "密码修改成功!", , "信息提示"
   Else
      MsgBox "没有要修改的相关信息!", , "信息提示"
   End If
 adoCon.Close
End Sub
Private Sub Command2_Click()
  frm_main.Enabled = True
  Unload Me
End Sub

⌨️ 快捷键说明

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