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

📄 userc.frm

📁 企业管理系统,用ACESS2000的数据库系统和ADO连接接口
💻 FRM
字号:
VERSION 5.00
Begin VB.Form userc 
   Caption         =   "帐户管理"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form2"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "放弃而返回"
      Default         =   -1  'True
      Height          =   615
      Left            =   2400
      TabIndex        =   3
      Top             =   1920
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   615
      Left            =   480
      TabIndex        =   2
      Top             =   1920
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1080
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "请确认新密码:"
      Height          =   495
      Left            =   600
      TabIndex        =   5
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "请输入新密码:"
      Height          =   495
      Left            =   600
      TabIndex        =   4
      Top             =   480
      Width           =   1455
   End
End
Attribute VB_Name = "userc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Conn As ADODB.Connection
Private Rst As New ADODB.Recordset

Private Sub Command1_Click()
   
    If Text1.Text = "" Then
 MsgBox "不能为空!"
 Text1.SetFocus
 Else
    If Trim(Text2.Text) <> Trim(Text1.Text) Then
    MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
    Text1.SetFocus
    Text1.Text = ""
    Text2.Text = ""
    Else
    If (Rst.State = adStateOpen) Then
        Rst.Close
    End If
    Rst.CursorLocation = adUseClient
    Rst.Open "Select * From userb", Conn, adOpenKeyset, adLockPessimistic
    Rst.Delete
    Rst.AddNew
    Rst.Fields("mm").Value = Text1.Text
    Rst.Update
    MsgBox "密码更改成功!"
    Unload Me
    Form1.Show
End If
End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
    
    Dim ConString As String
    ConString = "Provider=Microsoft.Jet.OleDb.4.0;Persist Security Info = False;" _
               & "Data Source =" & App.Path & "\db1.mdb;Jet OleDb:DataBase Password=123456"

    
    Set Conn = CreateObject("ADODB.Connection")
    With Conn
        .ConnectionString = ConString
        .Open
    End With
    
    Rst.CursorLocation = adUseClient
    Rst.Open "Select * From userb", Conn, adOpenKeyset, adLockPessimistic, adCmdText
End Sub



⌨️ 快捷键说明

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