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

📄 frmkhadd.frm

📁 很好用的通用库存管理程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmKHAdd 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "客户档案添加"
   ClientHeight    =   3435
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5655
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3435
   ScaleWidth      =   5655
   Begin VB.CommandButton Command2 
      Caption         =   "取 消"
      Height          =   375
      Left            =   4560
      TabIndex        =   11
      Top             =   3000
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保 存"
      Height          =   375
      Left            =   3240
      TabIndex        =   5
      Top             =   3000
      Width           =   855
   End
   Begin VB.TextBox TxtBZ 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   615
      Left            =   1320
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   4
      Top             =   2100
      Width           =   4215
   End
   Begin VB.TextBox TxtTele 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1320
      TabIndex        =   2
      Top             =   1200
      Width           =   4215
   End
   Begin VB.TextBox TxtLXR 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1320
      TabIndex        =   3
      Top             =   1680
      Width           =   1575
   End
   Begin VB.TextBox TxtAddress 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1320
      TabIndex        =   1
      Top             =   720
      Width           =   4215
   End
   Begin VB.TextBox TxtName 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1320
      TabIndex        =   0
      Top             =   240
      Width           =   4215
   End
   Begin VB.Label Label18 
      Caption         =   "备注:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   10
      Top             =   2280
      Width           =   615
   End
   Begin VB.Label Label14 
      Caption         =   "联系人:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   9
      Top             =   1680
      Width           =   735
   End
   Begin VB.Label Label13 
      Caption         =   "电话:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   480
      TabIndex        =   8
      Top             =   1200
      Width           =   615
   End
   Begin VB.Label Label12 
      Caption         =   "客户地址:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   720
      Width           =   975
   End
   Begin VB.Label Label11 
      Caption         =   "客户名称:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "FrmKHAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If TxtName.Text = "" Then
      MsgBox "请填写客户名称!"
      Exit Sub
    End If
    If TxtAddress.Text = "" Then
      MsgBox "请填写客户地址!"
      Exit Sub
    End If
    If TxtTele.Text = "" Then
      MsgBox "请填写客户电话!"
      Exit Sub
    End If
    If TxtLXR.Text = "" Then
      MsgBox "请填写联系人!"
      Exit Sub
    End If
   Make_Add
   FrmKHDA.Show
   Unload Me
End Sub
Private Sub Make_Add()
    sSql = "SELECT * FROM 客户表"
     Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
   Rs.AddNew
   Rs!客户名称 = TxtName.Text
   Rs!客户地址 = TxtAddress.Text
   Rs!电话 = TxtTele.Text
   Rs!联系人 = TxtLXR.Text
   If TxtBZ.Text = "" Then Rs!备注 = "-" Else Rs!备注 = TxtBZ.Text
   Rs.Update
   Rs.Close
End Sub
Private Sub Command2_Click()
   FrmKHDA.Show
   Unload Me
End Sub

Private Sub Form_Load()
Me.Top = MDIFrmMain.Height / 2 - Me.Height / 2 - 1000
Me.Left = MDIFrmMain.Width / 2 - Me.Width / 2
Set Rs = New Recordset
End Sub

⌨️ 快捷键说明

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