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

📄 users.frm

📁 这是本人利用vb+access 开发的一个二库存进销存系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form7 
   Caption         =   "密码更新"
   ClientHeight    =   2670
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form7"
   ScaleHeight     =   2670
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   3360
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   120
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "欧芬爱尔密码更新"
      ForeColor       =   &H000000FF&
      Height          =   2295
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   4455
      Begin VB.CommandButton Command2 
         Caption         =   "退  出"
         Height          =   375
         Left            =   2280
         TabIndex        =   6
         Top             =   1680
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         Caption         =   "修  改"
         Height          =   375
         Left            =   720
         TabIndex        =   5
         Top             =   1680
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   270
         Left            =   1560
         TabIndex        =   4
         Top             =   1080
         Width           =   2175
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1560
         TabIndex        =   2
         Top             =   600
         Width           =   2175
      End
      Begin VB.Label Label2 
         Caption         =   "密  码:"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   720
         TabIndex        =   3
         Top             =   1200
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "管理员:"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   720
         TabIndex        =   1
         Top             =   600
         Width           =   735
      End
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Then
   MsgBox "用户密码不能为空!", 0 + 16, "警告"
Else
Data1.Recordset.Edit
Data1.Recordset.Fields("username") = Text1.Text
Data1.Recordset.Fields("password") = Text2.Text
Data1.Recordset.Update
Data1.Refresh
MsgBox "恭喜!密码更新成功!", 0 + 64
Form7.Show
End If
 
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Activate()
Data1.DatabaseName = App.Path + "\odb.dll"
Data1.RecordSource = "users"
Data1.Refresh
Text1.Text = Data1.Recordset.Fields("username")
Text2.Text = Data1.Recordset.Fields("password")
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
       KeyAscii = 0
       Command1.Value = 1
    End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
       KeyAscii = 0
       Command1.Value = 1
    End If
End Sub

⌨️ 快捷键说明

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