📄 frm_khxxwh_kh.frm
字号:
TabIndex = 8
Top = 1290
Width = 7425
End
Begin VB.TextBox txt1
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 315
Index = 3
Left = 1320
TabIndex = 7
Top = 2040
Width = 1545
End
Begin VB.TextBox txt1
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 315
Index = 5
Left = 6435
TabIndex = 6
Top = 2025
Width = 2325
End
Begin VB.TextBox txt1
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 315
Index = 4
Left = 3840
TabIndex = 5
Top = 2025
Width = 1560
End
Begin VB.TextBox txt1
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 315
Index = 6
Left = 1320
TabIndex = 4
Top = 2400
Width = 1545
End
Begin VB.TextBox txt1
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 315
Index = 8
Left = 6450
TabIndex = 3
Top = 2400
Width = 2310
End
Begin VB.TextBox txt1
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 315
Index = 7
Left = 3840
TabIndex = 2
Top = 2400
Width = 1560
End
Begin VB.Label Label12
Caption = "联系人电话:"
Height = 315
Left = 180
TabIndex = 33
Top = 3555
Width = 1305
End
Begin VB.Label Label11
Caption = "备注信息:"
Height = 360
Left = 4515
TabIndex = 22
Top = 3585
Width = 1155
End
Begin VB.Label Label10
Caption = "客户名称:"
Height = 270
Left = 4335
TabIndex = 20
Top = 255
Width = 960
End
Begin VB.Label Label9
Caption = "企业资信:"
Height = 270
Left = 4335
TabIndex = 19
Top = 945
Width = 960
End
Begin VB.Label Label4
Caption = "客户级别:"
Height = 210
Left = 4335
TabIndex = 17
Top = 585
Width = 1185
End
Begin VB.Label Label8
Caption = "所属省份:"
Height = 255
Left = 180
TabIndex = 16
Top = 1695
Width = 1035
End
Begin VB.Label Label1
Caption = $"Frm_Khxxwh_kh.frx":0059
Height = 1335
Left = 180
TabIndex = 15
Top = 255
Width = 1185
End
Begin VB.Label Label3
Caption = "所属城市:"
Height = 270
Left = 4305
TabIndex = 14
Top = 1710
Width = 870
End
Begin VB.Label Label2
Caption = "公司邮编: 法人代表: 开户银行:"
Height = 255
Left = 195
TabIndex = 13
Top = 2085
Width = 6465
End
Begin VB.Label Label6
Caption = "公司网址: 公司电话:"
Height = 240
Left = 195
TabIndex = 12
Top = 2820
Width = 6570
End
Begin VB.Label Label5
Caption = "银行帐号: 纳税号: 客户IC卡号 "
Height = 330
Left = 195
TabIndex = 11
Top = 2460
Width = 6510
End
Begin VB.Label Label7
Caption = "公司传真: 主要联系人:"
Height = 255
Left = 180
TabIndex = 10
Top = 3225
Width = 6075
End
End
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 2550
_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_kh.frx":00E0
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":173A
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":2D94
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":43EE
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":5A48
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":70A2
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":86FC
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":9D56
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":B3B0
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":CA0A
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Khxxwh_kh.frx":E064
Key = ""
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "Frm_Khxxwh_kh"
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 '定义数据对象
Dim Mystr As String
Sub view_data() '定义显示数据的过程
If Adodc1.Recordset.RecordCount > 0 Then
With Dgr_Kh
If .Columns(0) <> "" Then Txt1(0).Text = .Columns(0) Else Txt1(0).Text = ""
If .Columns(1) <> "" Then Txt1(1).Text = .Columns(1) Else Txt1(1).Text = ""
If .Columns(2) <> "" Then Cbx_Xz.Text = .Columns(2) Else Cbx_Xz.Text = ""
If .Columns(3) <> "" Then Cbx_Lx.Text = .Columns(3) Else Cbx_Lx.Text = ""
If .Columns(4) <> "" Then Cbx_Zx.Text = .Columns(4) Else Cbx_Zx.Text = ""
If .Columns(5) <> "" Then Txt1(2).Text = .Columns(5) Else Txt1(2).Text = ""
If .Columns(6) <> "" Then Cbx_Sf.Text = .Columns(6) Else Cbx_Sf.Text = ""
If .Columns(7) <> "" Then Cbx_Cs.Text = .Columns(7) Else Cbx_Cs.Text = ""
If .Columns(8) <> "" Then Txt1(3).Text = .Columns(8) Else Txt1(3).Text = ""
If .Columns(9) <> "" Then Txt1(4).Text = .Columns(9) Else Txt1(4).Text = ""
If .Columns(10) <> "" Then Txt1(5).Text = .Columns(10) Else Txt1(5).Text = ""
If .Columns(11) <> "" Then Txt1(6).Text = .Columns(11) Else Txt1(6).Text = ""
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 = ""
If .Columns(14) <> "" Then Txt1(9).Text = .Columns(14) Else Txt1(9).Text = ""
If .Columns(15) <> "" Then Txt1(10).Text = .Columns(15) Else Txt1(10).Text = ""
If .Columns(16) <> "" Then Txt1(11).Text = .Columns(16) Else Txt1(11).Text = ""
If .Columns(17) <> "" Then Txt1(12).Text = .Columns(17) Else Txt1(12).Text = ""
If .Columns(18) <> "" Then Txt1(13).Text = .Columns(18) Else Txt1(13).Text = ""
If .Columns(19) <> "" Then Cbx_Jb.Text = .Columns(19) Else Cbx_Jb.Text = ""
If .Columns(20) <> "" Then Txt1(14).Text = .Columns(20) Else Txt1(14).Text = ""
End With
End If
End Sub
Private Sub Cbx_Cs_GotFocus()
Cbx_Cs.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Cs_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Txt1(3).SetFocus
End Sub
Private Sub Cbx_Cs_LostFocus()
Cbx_Cs.BackColor = &HFFFFFF
End Sub
Private Sub Cbx_Jb_GotFocus()
Cbx_Jb.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Jb_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Cbx_Lx.SetFocus
End Sub
Private Sub Cbx_Jb_LostFocus()
Cbx_Jb.BackColor = &HFFFFFF
Myrs.Open "select * from tb_Client_khjb where khjb_jbmc='" + Cbx_Jb.Text + "'", cnn, adOpenKeyset
If Myrs.RecordCount <= 0 Then
MsgBox "请在下拉列表中选择客户级别!", , "信息提示"
Cbx_Jb.ListIndex = 0
Cbx_Jb.SetFocus
Myrs.Close
Exit Sub
End If
Myrs.Close
End Sub
Private Sub Cbx_Lx_GotFocus()
Cbx_Lx.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Lx_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Cbx_Zx.SetFocus
End Sub
Private Sub Cbx_Lx_LostFocus()
Cbx_Lx.BackColor = &HFFFFFF
Myrs.Open "select * from tb_Client_qylx where qylx_lxmc='" + Cbx_Lx.Text + "'", cnn, adOpenKeyset
If Myrs.RecordCount <= 0 Then
MsgBox "请在下拉列表中选择企业类别!", , "信息提示"
Cbx_Lx.ListIndex = 0
Cbx_Lx.SetFocus
Myrs.Close
Exit Sub
End If
Myrs.Close
End Sub
Private Sub Cbx_Sf_Change()
If Cbx_Sf.Text <> "" Then
Dim rs7 As New ADODB.Recordset
rs7.Open "select * from tb_Client_csxx where csxx_sfmc='" + Cbx_Sf.Text + "'", cnn, adOpenKeyset, adLockOptimistic
If rs7.RecordCount > 0 Then
For i = 0 To rs7.RecordCount - 1
Cbx_Lx.AddItem rs7.Fields("csxx_csmc")
rs7.MoveNext
Next i
End If
rs7.Close
End If
End Sub
Private Sub Cbx_Sf_GotFocus()
Cbx_Sf.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Sf_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Province = Trim(Cbx_Sf.Text)
Myflag = True
Load Frm_Qgyb
Frm_Qgyb.Show 1
End If
End Sub
Private Sub Cbx_Sf_LostFocus()
Cbx_Sf.BackColor = &HFFFFFF
Mystr = Txt1(10).Text
End Sub
Private Sub Cbx_Xz_GotFocus()
Cbx_Xz.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Xz_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Cbx_Jb.SetFocus
End Sub
Private Sub Cbx_Xz_LostFocus()
Cbx_Xz.BackColor = &HFFFFFF
Myrs.Open "select * from tb_Client_qyxz where qyxz_xzmc='" + Cbx_Xz.Text + "'", cnn, adOpenKeyset
If Myrs.RecordCount <= 0 Then
MsgBox "请在下拉列表框中选择相应的企业性质", , "信息提示"
Cbx_Xz.ListIndex = 0
Cbx_Xz.SetFocus
Myrs.Close
Exit Sub
End If
Myrs.Close
End Sub
Private Sub Cbx_Zx_GotFocus()
Cbx_Zx.BackColor = &HFFFF80
End Sub
Private Sub Cbx_Zx_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then Txt1(2).SetFocus
End Sub
Private Sub Cbx_Zx_LostFocus()
Cbx_Zx.BackColor = &HFFFFFF
Myrs.Open "select * from tb_Client_qyzx where qyzx_zxjb='" + Cbx_Zx.Text + "'", cnn, adOpenKeyset
If Myrs.RecordCount <= 0 Then
MsgBox "请在下拉列表中选择企业资信!", , "信息提示"
Cbx_Zx.ListIndex = 0
Cbx_Zx.SetFocus
Myrs.Close
Exit Sub
End If
Myrs.Close
End Sub
Private Sub Form_Activate()
Adodc1.ConnectionString = PublicStr
If sql <> "" Then
Adodc1.RecordSource = sql & " order by khxx_id"
Adodc1.Refresh
Call view_data '调用过程
Call Dgr_Title
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有找到符合条件的记录!", , "提示窗口"
End If
End If
End Sub
Sub Dgr_Title()
Dgr_Kh.Columns(0).Caption = "客户编号"
Dgr_Kh.Columns(1).Caption = "客户名称"
Dgr_Kh.Columns(2).Caption = "企业性质"
Dgr_Kh.Columns(3).Caption = "企业类型"
Dgr_Kh.Columns(4).Caption = "企业资信"
Dgr_Kh.Columns(5).Caption = "企业地址"
Dgr_Kh.Columns(6).Caption = "所属省份"
Dgr_Kh.Columns(7).Caption = "所属城市"
Dgr_Kh.Columns(8).Caption = "公司邮编"
Dgr_Kh.Columns(9).Caption = "法人代表"
Dgr_Kh.Columns(10).Caption = "开户银行"
Dgr_Kh.Columns(11).Caption = "银行帐号"
Dgr_Kh.Columns(12).Caption = "纳税号"
Dgr_Kh.Columns(13).Caption = "客户IC卡号"
Dgr_Kh.Columns(14).Caption = "公司网址"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -