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

📄 frmaddcustomer.frm

📁 一个关于进销存的源代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmAddCustomer 
   Caption         =   "新增客户"
   ClientHeight    =   4560
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3585
   LinkTopic       =   "Form1"
   ScaleHeight     =   4560
   ScaleWidth      =   3585
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame2 
      Caption         =   "--客户添加--"
      Height          =   735
      Left            =   120
      TabIndex        =   7
      Top             =   3720
      Width           =   3375
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   375
         Left            =   1920
         TabIndex        =   9
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "添加"
         Height          =   375
         Left            =   360
         TabIndex        =   8
         Top             =   240
         Width           =   1095
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "--客户基本信息--"
      Height          =   3495
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3375
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   1200
         TabIndex        =   6
         Top             =   2880
         Width           =   1935
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   1200
         TabIndex        =   5
         Top             =   2376
         Width           =   1935
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1200
         TabIndex        =   4
         Top             =   1872
         Width           =   1935
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   1200
         TabIndex        =   3
         Top             =   1368
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1200
         TabIndex        =   2
         Top             =   864
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1200
         TabIndex        =   1
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label6 
         Caption         =   "备注"
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   2880
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "消费金额"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   2400
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "联系地址"
         Height          =   255
         Left            =   240
         TabIndex        =   13
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "联系点号"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   1440
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "客户名称"
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "客户卡号"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   480
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmAddCustomer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
     Dim rdst As New ADODB.Recordset
         rdst.Open "select * from customers where 客户卡号='" & Text1.Text & "'", g_conn
             If rdst.EOF = True And Text1.Text <> "" Then
                   Set rdst = Nothing
                   rdst.Open "insert into customers values ('" & UCase(Text1.Text) & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "')", g_conn
                   MsgBox "添加客户成功"
                   Unload Me
             ElseIf Text1.Text = "" Then
                   MsgBox "客户卡号不能为空,请重新选择"
             Else
                   MsgBox "客户卡号已存在,请重新选择"
             End If
End Sub

Private Sub Command2_Click()
        Unload Me
End Sub

⌨️ 快捷键说明

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