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

📄 添加信息.frm

📁 采购管理系统 放在D盘运行 无比简单 互弄作业用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 添加信息 
   Caption         =   "添加信息"
   ClientHeight    =   5175
   ClientLeft      =   3855
   ClientTop       =   2130
   ClientWidth     =   6270
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5175
   ScaleWidth      =   6270
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   4080
      TabIndex        =   2
      Top             =   4440
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "更新"
      Height          =   495
      Left            =   840
      TabIndex        =   1
      Top             =   4440
      Width           =   1215
   End
   Begin VB.Frame Framel 
      Caption         =   "添加"
      Height          =   3855
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   5535
      Begin VB.TextBox Text5 
         Height          =   495
         Left            =   3000
         TabIndex        =   12
         Top             =   2880
         Width           =   1095
      End
      Begin VB.TextBox Text4 
         Height          =   495
         Left            =   1440
         TabIndex        =   11
         Top             =   2880
         Width           =   1095
      End
      Begin VB.TextBox Text3 
         Height          =   495
         Left            =   4080
         TabIndex        =   5
         Top             =   1320
         Width           =   1095
      End
      Begin VB.TextBox Text2 
         Height          =   495
         Left            =   2280
         TabIndex        =   4
         Top             =   1320
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   495
         Left            =   480
         TabIndex        =   3
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "商品产地"
         BeginProperty Font 
            Name            =   "华文彩云"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   3120
         TabIndex        =   10
         Top             =   2520
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "商品数量"
         BeginProperty Font 
            Name            =   "华文彩云"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   1560
         TabIndex        =   9
         Top             =   2520
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "商品类别"
         BeginProperty Font 
            Name            =   "华文彩云"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   4200
         TabIndex        =   8
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "商品名称"
         BeginProperty Font 
            Name            =   "华文彩云"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   2400
         TabIndex        =   7
         Top             =   960
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "商品编号"
         BeginProperty Font 
            Name            =   "华文彩云"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   600
         TabIndex        =   6
         Top             =   960
         Width           =   1095
      End
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   "D:\武姜楠\db1.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   525
      Left            =   2280
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "商品基本信息表"
      Top             =   4440
      Width           =   1575
   End
End
Attribute VB_Name = "添加信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1 = "" Or Text2 = "" Or Text3 = "" Or Text4 = "" Or Text5 = "" Then
MsgBox "请输入完整数据!", 48
Text1.SetFocus
Exit Sub
End If
With Data1
.Recordset.AddNew
.Recordset("商品编号") = Text1
.Recordset("商品名称") = Text2
.Recordset("商品类别") = Text3
.Recordset("商品数量") = Text4
.Recordset("商品产地") = Text5
.Recordset.Update
End With
Text1 = "": Text2 = "": Text3 = "": Text4 = "": Text5 = "": Text1.SetFocus
End Sub

Private Sub Command2_Click()
主界面.Show
Unload Me
End Sub

⌨️ 快捷键说明

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