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

📄 frmsetuser.frm

📁 VB编写的超市管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSetUser 
   BackColor       =   &H00C0FFC0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "添加用户"
   ClientHeight    =   3150
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5295
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3150
   ScaleWidth      =   5295
   StartUpPosition =   2  'CenterScreen
   Begin VB.ComboBox cboType 
      Height          =   315
      ItemData        =   "frmSetUser.frx":0000
      Left            =   1560
      List            =   "frmSetUser.frx":000D
      Style           =   2  'Dropdown List
      TabIndex        =   6
      Top             =   600
      Width           =   2295
   End
   Begin VB.CommandButton Command3 
      Caption         =   "取消"
      Height          =   375
      Left            =   2760
      TabIndex        =   5
      Top             =   2520
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   1440
      TabIndex        =   4
      Top             =   2520
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   1560
      TabIndex        =   3
      Top             =   1680
      Width           =   2295
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   1560
      TabIndex        =   2
      Top             =   1080
      Width           =   2295
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "类型*"
      Height          =   255
      Index           =   0
      Left            =   960
      TabIndex        =   7
      Top             =   600
      Width           =   495
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "初始密码"
      Height          =   195
      Left            =   840
      TabIndex        =   1
      Top             =   1800
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户名*"
      Height          =   195
      Index           =   1
      Left            =   840
      TabIndex        =   0
      Top             =   1200
      Width           =   600
   End
End
Attribute VB_Name = "frmSetUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sql As String
Dim RS As ADODB.Recordset
Private Sub Command1_Click()
'添加用户
If Trim(Me.Text1.Text) <> "" Then
    Sql = "select 密码 from 密码表 where 用户名='" & Trim(Me.Text1.Text)
    Sql = Sql & "' and 类型='" & Trim(Me.cboType.Text) & "'"
    Set RS = dbSelect(Sql)
    If Not RS.EOF Then
        MsgBox "库中已有此用户!"
    Else
        Sql = "insert into 密码表 values('" & Trim(Me.Text1.Text)
        Sql = Sql & "','" & Trim(Me.Text2.Text)
        Sql = Sql & "','" & Trim(Me.cboType.Text) & "')"
        dbOperate Sql
        Me.Text1.Text = ""
        Me.Text2.Text = ""
    End If
Else
    MsgBox "主键不能为空!"
End If
End Sub
Private Sub Command3_Click()
'关闭
Unload Me
End Sub
Private Sub Form_Load()
Me.cboType.ListIndex = 0
End Sub

⌨️ 快捷键说明

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