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

📄 frmtrade.frm

📁 比较完整的一个客户管理软件
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form FrmTradeInfo 
   Caption         =   "交易信息录入"
   ClientHeight    =   4590
   ClientLeft      =   3900
   ClientTop       =   3180
   ClientWidth     =   6195
   Icon            =   "frmTrade.frx":0000
   LinkTopic       =   "Form2"
   MDIChild        =   -1  'True
   Picture         =   "frmTrade.frx":08CA
   ScaleHeight     =   4590
   ScaleWidth      =   6195
   Begin VB.CommandButton Command4 
      Caption         =   "取消"
      Height          =   375
      Left            =   4800
      Picture         =   "frmTrade.frx":18038
      Style           =   1  'Graphical
      TabIndex        =   28
      Top             =   4080
      Width           =   1095
   End
   Begin VB.TextBox TxtProduction 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   1200
      TabIndex        =   27
      Top             =   600
      Width           =   2295
   End
   Begin VB.TextBox txtBindType 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   4320
      TabIndex        =   24
      Top             =   1800
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "完  成"
      Height          =   375
      Left            =   3600
      Picture         =   "frmTrade.frx":1B040
      Style           =   1  'Graphical
      TabIndex        =   18
      Top             =   4080
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "重新输入"
      Height          =   375
      Left            =   2520
      Picture         =   "frmTrade.frx":1E048
      Style           =   1  'Graphical
      TabIndex        =   17
      Top             =   4080
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "继续添加"
      Height          =   375
      Left            =   1320
      Picture         =   "frmTrade.frx":21050
      Style           =   1  'Graphical
      TabIndex        =   16
      Top             =   4080
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   300
      Left            =   1200
      TabIndex        =   15
      Top             =   120
      Width           =   2295
   End
   Begin MSComCtl2.DTPicker DTrade 
      Height          =   375
      Left            =   4320
      TabIndex        =   14
      Top             =   120
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      _Version        =   393216
      CalendarBackColor=   16777215
      CalendarForeColor=   16711935
      CalendarTitleBackColor=   16744448
      CalendarTitleForeColor=   12582912
      CalendarTrailingForeColor=   16777215
      Format          =   85721089
      CurrentDate     =   37958
   End
   Begin VB.TextBox TxtBackup 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   855
      Left            =   1200
      TabIndex        =   13
      Top             =   3000
      Width           =   4815
   End
   Begin VB.TextBox TxtSum 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   1200
      TabIndex        =   11
      Top             =   2400
      Width           =   1575
   End
   Begin VB.TextBox TxtSingle 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   4320
      TabIndex        =   9
      Top             =   1320
      Width           =   975
   End
   Begin VB.TextBox TxtNum 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   1200
      TabIndex        =   7
      Top             =   1800
      Width           =   1575
   End
   Begin VB.TextBox TxtSize 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   4320
      TabIndex        =   6
      Top             =   720
      Width           =   975
   End
   Begin VB.TextBox TxtPaper 
      BackColor       =   &H00C0E0FF&
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   1200
      TabIndex        =   3
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label14 
      BackStyle       =   0  'Transparent
      Caption         =   "产品名称:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   120
      TabIndex        =   26
      Top             =   720
      Width           =   975
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "克"
      ForeColor       =   &H8000000E&
      Height          =   255
      Index           =   1
      Left            =   2880
      TabIndex        =   25
      Top             =   1320
      Width           =   495
   End
   Begin VB.Label Label13 
      BackStyle       =   0  'Transparent
      Caption         =   "装订方式:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   3360
      TabIndex        =   23
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label12 
      BackStyle       =   0  'Transparent
      Caption         =   "本/张"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   2760
      TabIndex        =   22
      Top             =   1920
      Width           =   495
   End
   Begin VB.Label Label11 
      BackStyle       =   0  'Transparent
      Caption         =   "开"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   5400
      TabIndex        =   21
      Top             =   840
      Width           =   495
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "元/每张"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   5400
      TabIndex        =   20
      Top             =   1440
      Width           =   735
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "元"
      ForeColor       =   &H8000000E&
      Height          =   255
      Index           =   0
      Left            =   2880
      TabIndex        =   19
      Top             =   2520
      Width           =   495
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "备注:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   480
      TabIndex        =   12
      Top             =   3120
      Width           =   615
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "总金额:"
      ForeColor       =   &H8000000E&
      Height          =   375
      Left            =   240
      TabIndex        =   10
      Top             =   2520
      Width           =   975
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "单价:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   3720
      TabIndex        =   8
      Top             =   1440
      Width           =   615
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "数量:"
      ForeColor       =   &H8000000E&
      Height          =   375
      Left            =   480
      TabIndex        =   5
      Top             =   1920
      Width           =   735
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "尺寸:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   3720
      TabIndex        =   4
      Top             =   840
      Width           =   615
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "用纸要求:"
      ForeColor       =   &H8000000E&
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   1320
      Width           =   975
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "客户名称:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   975
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "日期:"
      ForeColor       =   &H8000000E&
      Height          =   255
      Left            =   3720
      TabIndex        =   0
      Top             =   240
      Width           =   615
   End
End
Attribute VB_Name = "FrmTradeInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
   On Error GoTo Cancle
    Dim sql As String
    Dim rsTrade As New ADODB.Recordset
    Dim TempBool As Boolean
    
    sql = "Select * from 交易统计表"
    rsTrade.Open sql, cn, adOpenDynamic, adLockOptimistic
        
            TempBool = rsTrade.Supports(adAddNew)
            rsTrade.AddNew
            rsTrade("客户名称") = Me.Combo1.Text
            rsTrade("产品名称") = Me.TxtProduction.Text
            rsTrade("交易日期") = DTrade.Value
            rsTrade("用纸要求") = TxtPaper.Text
            rsTrade("尺寸") = Val(TxtSize.Text)
            rsTrade("单价") = Val(TxtSingle.Text)
            rsTrade("数量") = Val(TxtNum.Text)
            rsTrade("总金额") = Val(TxtSum.Text)
            rsTrade("备注") = TxtBackup.Text
            rsTrade("装订方式") = txtBindType.Text
 
            rsTrade.Update
            rsTrade.Close

    TxtPaper.Text = ""
    TxtProduction.SetFocus
    TxtSize.Text = ""
    TxtSingle.Text = ""
    TxtNum.Text = ""
    TxtSum.Text = ""
    txtBindType.Text = ""
    TxtBackup.Text = ""
    TxtProduction.Text = ""
    MsgBox "添加成功!"
    Exit Sub
Cancle:
    MsgBox "添加失败,发现未知错误!请关闭系统重试!"

End Sub

Private Sub Command2_Click()
    TxtPaper.Text = ""
    TxtProduction.SetFocus
    TxtSize.Text = ""
    TxtSingle.Text = ""
    TxtNum.Text = ""
    TxtSum.Text = ""
    TxtBackup.Text = ""
    TxtProduction.Text = ""
End Sub

Private Sub Command3_Click()
On Error GoTo Cancle
    Dim sql As String
    Dim rsTrade As New ADODB.Recordset
    Dim TempBool As Boolean
    
    sql = "Select * from 交易统计表 "
    rsTrade.Open sql, cn, adOpenDynamic, adLockOptimistic
        
            TempBool = rsTrade.Supports(adAddNew)
            rsTrade.AddNew
            rsTrade("客户名称") = Me.Combo1.Text
            rsTrade("产品名称") = Me.TxtProduction.Text
            rsTrade("交易日期") = DTrade.Value
            rsTrade("用纸要求") = TxtPaper.Text
            rsTrade("尺寸") = Val(TxtSize.Text)
            rsTrade("单价") = Val(TxtSingle.Text)
            rsTrade("数量") = Val(TxtNum.Text)
            rsTrade("总金额") = Val(TxtSum.Text)
            rsTrade("备注") = TxtBackup.Text
            rsTrade("装订方式") = txtBindType.Text
 
            rsTrade.Update
            rsTrade.Close
            MsgBox "添加成功!"
            Unload Me
            Exit Sub
Cancle:
    MsgBox "添加失败,发现未知错误!请关闭系统重试!"
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
 On Error Resume Next
    Dim rsClient As New ADODB.Recordset
    Dim sql As String
   sql = "select * from 客户表"
   rsClient.Open sql, cn, adOpenKeyset
   
   Dim i As Integer
   For i = 1 To rsClient.RecordCount
      Me.Combo1.AddItem rsClient("客户名称")
      If Not rsClient.EOF Then
         rsClient.MoveNext
      End If
   Next
    rsClient.MoveLast
    Combo1.Text = rsClient("客户名称")
    rsClient.Close
    Me.DTrade.Value = Format(Now, "yyyy-mm-dd")
    Me.Height = 4890
    Me.ScaleWidth = 6395
   
End Sub

⌨️ 快捷键说明

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