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

📄 frm_khxxwh_lxr.frm

📁 本系统为客户管理系统 (1)本系统的数据库为SQL Server 2000
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Height          =   735
            Index           =   8
            Left            =   1275
            TabIndex        =   22
            Top             =   3195
            Width           =   6840
         End
         Begin VB.TextBox txt1 
            Height          =   315
            Index           =   7
            Left            =   5310
            Locked          =   -1  'True
            TabIndex        =   19
            Top             =   2820
            Width           =   2790
         End
         Begin VB.ComboBox Cbx_Zw 
            Height          =   300
            Left            =   1275
            TabIndex        =   18
            Text            =   "Cbx_Zw"
            Top             =   1320
            Width           =   2820
         End
         Begin VB.ComboBox Cbx_Xb 
            Height          =   300
            ItemData        =   "Frm_Khxxwh_lxr.frx":0059
            Left            =   5310
            List            =   "Frm_Khxxwh_lxr.frx":005B
            TabIndex        =   17
            Text            =   "Cbx_Xb"
            Top             =   585
            Width           =   2790
         End
         Begin VB.ComboBox Cbx_Qymc 
            Height          =   300
            Left            =   5310
            TabIndex        =   0
            Text            =   "Cbx_Qymc"
            Top             =   195
            Width           =   2775
         End
         Begin VB.TextBox txt1 
            Height          =   315
            Index           =   1
            Left            =   1275
            TabIndex        =   15
            Top             =   585
            Width           =   2820
         End
         Begin VB.TextBox txt1 
            BackColor       =   &H00FFFFFF&
            Enabled         =   0   'False
            Height          =   315
            Index           =   0
            Left            =   1275
            TabIndex        =   5
            Top             =   225
            Width           =   2820
         End
         Begin VB.TextBox txt1 
            BackColor       =   &H00FFFFFF&
            Enabled         =   0   'False
            Height          =   315
            Index           =   2
            Left            =   5310
            Locked          =   -1  'True
            TabIndex        =   4
            Top             =   930
            Width           =   2805
         End
         Begin VB.TextBox txt1 
            BackColor       =   &H00FFFFFF&
            Enabled         =   0   'False
            Height          =   735
            Index           =   6
            Left            =   1275
            TabIndex        =   3
            Top             =   2025
            Width           =   6840
         End
         Begin VB.Label Label13 
            Caption         =   "办公电话:"
            Height          =   240
            Left            =   4290
            TabIndex        =   23
            Top             =   1365
            Width           =   900
         End
         Begin VB.Label Label12 
            Caption         =   "信息登记人:"
            Height          =   240
            Left            =   4230
            TabIndex        =   21
            Top             =   2865
            Width           =   1140
         End
         Begin VB.Label Label11 
            Caption         =   "备注信息:"
            Height          =   225
            Left            =   180
            TabIndex        =   16
            Top             =   3195
            Width           =   900
         End
         Begin VB.Label Label10 
            Caption         =   "企业名称:"
            Height          =   270
            Left            =   4260
            TabIndex        =   14
            Top             =   255
            Width           =   960
         End
         Begin VB.Label Label9 
            Caption         =   "联系人年龄:"
            Height          =   270
            Left            =   4230
            TabIndex        =   13
            Top             =   1005
            Width           =   1005
         End
         Begin VB.Label Label4 
            Caption         =   "联系人性别:"
            Height          =   210
            Left            =   4200
            TabIndex        =   11
            Top             =   615
            Width           =   1185
         End
         Begin VB.Label Label8 
            Caption         =   "电子邮件:"
            Height          =   255
            Left            =   180
            TabIndex        =   10
            Top             =   1680
            Width           =   1035
         End
         Begin VB.Label Label1 
            Caption         =   $"Frm_Khxxwh_lxr.frx":005D
            Height          =   1335
            Left            =   180
            TabIndex        =   9
            Top             =   255
            Width           =   1185
         End
         Begin VB.Label Label3 
            Caption         =   "联系人手机:"
            Height          =   270
            Left            =   4215
            TabIndex        =   8
            Top             =   1740
            Width           =   1005
         End
         Begin VB.Label Label2 
            Caption         =   "个人简介:"
            Height          =   225
            Left            =   195
            TabIndex        =   7
            Top             =   2010
            Width           =   960
         End
         Begin VB.Label Label6 
            Caption         =   "登记日期:                                              公司电话:"
            Height          =   240
            Left            =   195
            TabIndex        =   6
            Top             =   2835
            Width           =   930
         End
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   -195
         Top             =   2535
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   26
         ImageHeight     =   26
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   11
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":00E5
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":173F
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":2D99
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":43F3
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":5A4D
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":70A7
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":8701
               Key             =   ""
            EndProperty
            BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":9D5B
               Key             =   ""
            EndProperty
            BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":B3B5
               Key             =   ""
            EndProperty
            BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":CA0F
               Key             =   ""
            EndProperty
            BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "Frm_Khxxwh_lxr.frx":E069
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "Frm_Khxxwh_Lxr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer, myval As Integer     '定义整型变量
Public blnadd1 As Boolean
Dim Myrs As New ADODB.Recordset

Sub view_data()     '定义显示数据的过程
  If Adodc1.Recordset.RecordCount > 0 Then
     With Dgr_Lxr
        If .Columns(0) <> "" Then Txt1(0).Text = .Columns(0) Else Txt1(0).Text = ""
        If .Columns(1) <> "" Then Cbx_Qymc.Text = .Columns(1) Else Cbx_Qymc.Text = ""
        If .Columns(2) <> "" Then Txt1(1).Text = .Columns(2) Else Txt1(1).Text = ""
        If .Columns(3) <> "" Then Cbx_Xb.Text = .Columns(3) Else Cbx_Xb.Text = ""
        If .Columns(4) <> "" Then Dtp_Csny.Value = .Columns(4) Else Dtp_Csny.Value = Date
        If .Columns(5) <> "" Then Txt1(2).Text = .Columns(5) Else Txt1(2).Text = ""
        If .Columns(6) <> "" Then Cbx_Zw.Text = .Columns(6) Else Cbx_Zw.Text = ""
        If .Columns(7) <> "" Then Txt1(3).Text = .Columns(7) Else Txt1(3).Text = ""
        If .Columns(8) <> "" Then Txt1(4).Text = .Columns(8) Else Txt1(4).Text = ""
        If .Columns(9) <> "" Then Txt1(5).Text = .Columns(9) Else Txt1(5).Text = ""
        If .Columns(10) <> "" Then Txt1(6).Text = .Columns(10) Else Txt1(6).Text = ""
        If .Columns(11) <> "" Then Dtp_Date.Value = .Columns(11) Else Dtp_Date.Value = Date
        If .Columns(12) <> "" Then Txt1(7).Text = .Columns(12) Else Txt1(7).Text = ""
        If .Columns(13) <> "" Then Txt1(8).Text = .Columns(13) Else Txt1(8).Text = ""
     End With
  End If
End Sub

Private Sub Cbx_Qymc_Click()
Dim rs2 As New ADODB.Recordset
rs2.Open "select * from tb_khxx where khxx_mc='" + Cbx_Qymc.Text + "'", cnn, adOpenKeyset
If rs2.RecordCount > 0 Then
  Txt1(1).Text = rs2.Fields("khxx_lxr")
  Txt1(3).Text = rs2.Fields("khxx_gsdh")
  Txt1(5).Text = rs2.Fields("khxx_lxrdh")
Else
  MsgBox "您输入的企业名称不是本单位的客户,请确认后重新输入!", vbInformation, "信息提示"
  Cbx_Qymc.Text = ""
  Cbx_Qymc.SetFocus
End If
rs2.Close
End Sub

Private Sub Cbx_Qymc_GotFocus()
Cbx_Qymc.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Qymc_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Txt1(1).SetFocus
End Sub

Private Sub Cbx_Qymc_LostFocus()
Cbx_Qymc.BackColor = &HFFFFFF
Dim rs2 As New ADODB.Recordset
rs2.Open "select * from tb_khxx where khxx_mc='" + Cbx_Qymc.Text + "'", cnn, adOpenKeyset
If rs2.RecordCount > 0 Then
  Txt1(1).Text = rs2.Fields("khxx_lxr")
  Txt1(3).Text = rs2.Fields("khxx_gsdh")
  Txt1(5).Text = rs2.Fields("khxx_lxrdh")
Else
  MsgBox "您输入的企业不是本单位的客户,请确认后重新输入!", vbInformation, "信息提示"
  Cbx_Qymc.Text = ""
  Cbx_Qymc.SetFocus
End If
rs2.Close
End Sub

Private Sub Cbx_Xb_GotFocus()
Cbx_Xb.BackColor = &HFFFF80
End Sub

Private Sub Cbx_Xb_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Dtp_Csny.SetFocus
End Sub

Private Sub Cbx_Xb_LostFocus()
Cbx_Xb.BackColor = &HFFFFFF

If Trim(Cbx_Xb.Text) = "男" Or Trim(Cbx_Xb.Text) = "女" Then
     Exit Sub
Else
    MsgBox "请输入正确的性别信息!", , "信息提示"
    Cbx_Xb.SetFocus
    Exit Sub
End If
End Sub

Private Sub Cbx_Zw_GotFocus()
Cbx_Zw.BackColor = &HFFFF80
End Sub

Private Sub Cbx_Zw_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Txt1(3).SetFocus
End Sub

Private Sub Cbx_Zw_LostFocus()
Cbx_Zw.BackColor = &HFFFFFF
End Sub

Private Sub Dtp_Csny_GotFocus()
Dtp_Csny.CalendarBackColor = &HFFFF80
End Sub

Private Sub Dtp_Csny_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Txt1(2).SetFocus
End Sub

Private Sub Dtp_Csny_LostFocus()
Dtp_Csny.CalendarBackColor = &HFFFFFF
Txt1(2).Text = Val(Left(Date, 4)) - Val(Left(Dtp_Csny.Value, 4))
End Sub

Private Sub Dtp_Date_GotFocus()
Dtp_Date.CalendarBackColor = &HFFFF80
End Sub

⌨️ 快捷键说明

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