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

📄 frmmdfuser.frm

📁 婚姻介绍所管理信息系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmMdfUser 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改用户名"
   ClientHeight    =   2595
   ClientLeft      =   5025
   ClientTop       =   4215
   ClientWidth     =   4545
   Icon            =   "FrmMdfUser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2595
   ScaleWidth      =   4545
   ShowInTaskbar   =   0   'False
   Begin VB.Frame Frame1 
      Height          =   2040
      Left            =   45
      TabIndex        =   5
      Top             =   0
      Width           =   4455
      Begin MSAdodcLib.Adodc AdoMdfUser 
         Height          =   330
         Left            =   180
         Top             =   1665
         Visible         =   0   'False
         Width           =   1200
         _ExtentX        =   2117
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.TextBox Text2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1395
         TabIndex        =   1
         Top             =   855
         Width           =   2415
      End
      Begin VB.TextBox Text3 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1395
         TabIndex        =   2
         Top             =   1350
         Width           =   2415
      End
      Begin VB.TextBox Text1 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1395
         TabIndex        =   0
         Top             =   360
         Width           =   2415
      End
      Begin VB.Label Label1 
         Caption         =   "旧用户名"
         Height          =   195
         Left            =   405
         TabIndex        =   9
         Top             =   450
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "新用户名"
         Height          =   195
         Left            =   405
         TabIndex        =   8
         Top             =   945
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "确认用户名"
         Height          =   195
         Left            =   405
         TabIndex        =   7
         Top             =   1440
         Width           =   915
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   330
      Left            =   405
      TabIndex        =   3
      Top             =   2160
      Width           =   870
   End
   Begin VB.CommandButton Command2 
      Caption         =   "应用"
      Height          =   330
      Left            =   1800
      TabIndex        =   4
      Top             =   2160
      Width           =   870
   End
   Begin VB.CommandButton Command3 
      Caption         =   "取消"
      Height          =   330
      Left            =   3285
      TabIndex        =   6
      Top             =   2160
      Width           =   870
   End
End
Attribute VB_Name = "FrmMdfUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If Text1.Text = curUser Then
        If Text2.Text = Text3.Text Then
            sqlStr = "select * from userdb where NAME='" & curUser & "'"
            AdoMdfUser.RecordSource = sqlStr
            'MsgBox sqlStr
            AdoMdfUser.Refresh
            AdoMdfUser.Recordset.Fields.Item(0).Value = Text2.Text
            AdoMdfUser.Recordset.Update
            MsgBox "修改成功!", vbOKOnly, "提示"
        Else
            MsgBox "两次输入的密码不同,请重新输入!", vbInformation, "警告"
        End If
    Else
        MsgBox "原用户名不正确,请重新输入!", vbOKOnly, "警告"
    End If
    curUser = Text2.Text
    Unload Me
End Sub

Private Sub Command2_Click()
    If Text1.Text = curUser Then
        If Text2.Text = Text3.Text Then
            sqlStr = "select * from userdb where NAME='" & curUser & "'"
            AdoMdfUser.RecordSource = sqlStr
            'MsgBox sqlStr
            AdoMdfUser.Refresh
            AdoMdfUser.Recordset.Fields.Item(0).Value = Text2.Text
            AdoMdfUser.Recordset.Update
            MsgBox "修改成功!", vbOKOnly, "提示"
        Else
            MsgBox "两次输入的密码不同,请重新输入!", vbInformation, "警告"
        End If
    Else
        MsgBox "原用户名不正确,请重新输入!", vbOKOnly, "警告"
    End If
    curUser = Text2.Text
End Sub

Private Sub Command3_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    AdoMdfUser.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\mgydb.mdb;Persist Security Info=False"
    AdoMdfUser.CommandType = adCmdText
End Sub

⌨️ 快捷键说明

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