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

📄 tjkh.frm

📁 关于图书销售管理
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form tjkh 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "添加客户"
   ClientHeight    =   4950
   ClientLeft      =   6060
   ClientTop       =   1905
   ClientWidth     =   5475
   Icon            =   "tjkh.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4950
   ScaleWidth      =   5475
   Begin VB.CommandButton Command3 
      Caption         =   "返回(&B)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3840
      TabIndex        =   18
      Top             =   3960
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "继续添加(&A)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      TabIndex        =   17
      Top             =   3960
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保存(&S)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   240
      TabIndex        =   16
      Top             =   3960
      Width           =   1335
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   450
      Left            =   0
      TabIndex        =   9
      Top             =   4500
      Width           =   5475
      _ExtentX        =   9657
      _ExtentY        =   794
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   4304
            MinWidth        =   4304
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   4410
            MinWidth        =   4410
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Comic Sans MS"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Frame Frame1 
      Height          =   3855
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   5415
      Begin VB.TextBox Text7 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   2040
         TabIndex        =   6
         Top             =   2640
         Width           =   2895
      End
      Begin VB.TextBox Text6 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   2040
         TabIndex        =   3
         Top             =   1200
         Width           =   2895
      End
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   ""
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   375
         Left            =   240
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   ""
         Top             =   3360
         Visible         =   0   'False
         Width           =   1500
      End
      Begin VB.TextBox Text5 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   2040
         TabIndex        =   1
         Top             =   240
         Width           =   2895
      End
      Begin VB.TextBox Text4 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   2040
         TabIndex        =   2
         Top             =   720
         Width           =   2895
      End
      Begin VB.TextBox Text3 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   2040
         TabIndex        =   4
         Top             =   1680
         Width           =   2895
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   375
         Left            =   2040
         TabIndex        =   5
         Top             =   2160
         Width           =   2895
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   615
         Left            =   2040
         MultiLine       =   -1  'True
         TabIndex        =   7
         Top             =   3120
         Width           =   2895
      End
      Begin VB.Label Label7 
         Caption         =   "地址"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   15
         Top             =   2760
         Width           =   615
      End
      Begin VB.Label Label6 
         Caption         =   "联系电话"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   14
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "备注:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   13
         Top             =   3240
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "联系人"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   12
         Top             =   2280
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "客户类型"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   11
         Top             =   1320
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "客户名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   10
         Top             =   840
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "客户编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   8
         Top             =   360
         Width           =   1095
      End
   End
End
Attribute VB_Name = "tjkh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public bc As Boolean

Private Sub Command1_Click()
'czrygl.Data1.Recordset.MoveLast
bc = True
If Text5.Text = "" Then
    MsgBox "客户编号不能为空。", vbCritical, "警告"
    Text5.SetFocus
    Exit Sub
End If

If Len(Text1.Text) > 50 Then
    MsgBox "备注不要多于25个字", vbCritical, "警告"
    Text1.SetFocus
    Exit Sub
End If

tjkh.Data1.Recordset.AddNew
tjkh.Data1.Recordset("dwbh") = Trim(Text5.Text)
tjkh.Data1.Recordset("dwmc") = Trim(Text4.Text)
'If Option1.Value = True Then
     tjkh.Data1.Recordset("khlx") = Trim(Text6.Text)
 '  Else
  '    tjzy.Data1.Recordset("xb") = "女"
'End If
tjkh.Data1.Recordset("lxdh") = Trim(Text3.Text)
tjkh.Data1.Recordset("lxr") = Trim(Text2.Text)
 tjkh.Data1.Recordset("dz") = Trim(Text7.Text)
tjkh.Data1.Recordset("bz") = Trim(Text1.Text)
tjkh.Data1.Recordset.Update
'Call Form_Activate
tjkh.Data1.Refresh
End Sub

Private Sub Command2_Click()
  '自动生成编号
  If bc = False Then
      MsgBox "请先将当前记录保存。", vbInformation, "提示"
      Exit Sub
  End If
  
  'Data1.Recordset.MoveLast
  'If (Val(Data1.Recordset("zybh")) + 1) < 10 Then Text5.Text = "000" & (Val(Data1.Recordset("zybh")) + 1)
  'If (Val(Data1.Recordset("zybh")) + 1) >= 10 And (Val(Data1.Recordset("zybh")) + 1) < 100 Then
   '          Text5.Text = "00" & (Val(Data1.Recordset("zybh")) + 1)
 'End If
 'If (Val(Data1.Recordset("zybh")) + 1) >= 100 Then
  '           Text5.Text = "0" + (Val(Data1.Recordset("zybh")) + 1)
 'End If
Text7.Text = ""
Text6.Text = ""
Text5.Text = ""
Text4.Text = ""
Text3.Text = ""
Text2.Text = ""
Text1.Text = ""
bc = False
End Sub

Private Sub Command3_Click()
khxx.Show
Unload Me
End Sub

Private Sub Form_Activate()
  '自动生成编号
  Text5.SetFocus
'  Data1.Recordset.MoveLast
'  If (Val(Data1.Recordset("zybh")) + 1) < 10 Then Text5.Text = "000" & (Val(Data1.Recordset("zybh")) + 1)
'  If (Val(Data1.Recordset("zybh")) + 1) >= 10 And (Val(Data1.Recordset("zybh")) + 1) < 100 Then
'             Text5.Text = "00" & (Val(Data1.Recordset("zybh")) + 1)
' End If
' If (Val(Data1.Recordset("zybh")) + 1) > 100 Then
'             Text5.Text = "0" + (Val(Data1.Recordset("zybh")) + 1)
' End If
'  Text4.SetFocus
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\db1.mdb"
Data1.RecordSource = "select * from wldw"
'Text5.SetFocus
End Sub

Private Sub Text5_Click()
' MsgBox "系统管理员不可删除", vbCritical, "警告"
End Sub

Private Sub Text5_LostFocus()
'Text3.SetFocus

End Sub

⌨️ 快捷键说明

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