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

📄 新会员.frm

📁 这是一个书店售书管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form form8 
   Caption         =   "Form1"
   ClientHeight    =   3150
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3150
   ScaleWidth      =   4680
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1920
      TabIndex        =   9
      Top             =   2160
      Width           =   735
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   3000
      TabIndex        =   8
      Top             =   2640
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加"
      Height          =   375
      Left            =   1560
      TabIndex        =   7
      Top             =   2640
      Width           =   975
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1920
      TabIndex        =   6
      Top             =   1680
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1920
      TabIndex        =   4
      Top             =   960
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1920
      TabIndex        =   2
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label5 
      Caption         =   "会员新号"
      Height          =   495
      Left            =   600
      TabIndex        =   10
      Top             =   2160
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "余额"
      Height          =   375
      Left            =   600
      TabIndex        =   5
      Top             =   1800
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "电话"
      Height          =   375
      Left            =   600
      TabIndex        =   3
      Top             =   1200
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "姓名"
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   600
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "新会员基本信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   2175
   End
End
Attribute VB_Name = "form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim note As New ADODB.Recordset
Dim num As Integer
Private Sub Command1_Click()
Dim sql As String
sql = "select * from 会员表"
  note.Open sql, cnn, 3, 2
  note.AddNew
  note.Fields("会员号").Value = Text4.Text
  note.Fields("姓名").Value = Text1.Text
  note.Fields("电话").Value = Text2.Text
  note.Fields("余额").Value = Text3.Text
  note.Update
MsgBox "提交成功!"
  Text1.Text = ""
  Text2.Text = ""
  Text3.Text = ""
note.Close
Call Form_Load       '调用会员号自动生成函数
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim sql As String
Dim num As Integer
sql = "select * from 会员表"
note.Open sql, cnn, 3, 2
note.MoveLast
Me.Text4.Text = note.Fields("会员号").Value + 1    '自动生成新会员号
Text4.Locked = True          '锁定控件
note.Close
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

⌨️ 快捷键说明

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