📄 frmslclient.frm
字号:
VERSION 5.00
Begin VB.Form FrmSlClient
Caption = "请选择一个客户"
ClientHeight = 2715
ClientLeft = 60
ClientTop = 345
ClientWidth = 2775
Icon = "FrmSlClient.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
Picture = "FrmSlClient.frx":08CA
ScaleHeight = 2715
ScaleWidth = 2775
Begin VB.CommandButton Command4
Caption = "修改此客户的交易信息"
Height = 375
Left = 0
Picture = "FrmSlClient.frx":18038
Style = 1 'Graphical
TabIndex = 4
Top = 2280
Width = 2775
End
Begin VB.CommandButton Command3
Caption = "修 改"
Height = 375
Left = 1800
Picture = "FrmSlClient.frx":2E2E4
Style = 1 'Graphical
TabIndex = 3
Top = 840
Width = 855
End
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 1800
Picture = "FrmSlClient.frx":44590
Style = 1 'Graphical
TabIndex = 2
Top = 1440
Width = 855
End
Begin VB.CommandButton Command1
Caption = "查 看"
Height = 375
Left = 1800
Picture = "FrmSlClient.frx":5A83C
Style = 1 'Graphical
TabIndex = 1
Top = 240
Width = 855
End
Begin VB.ListBox List1
ForeColor = &H00800000&
Height = 2040
Left = 0
TabIndex = 0
Top = 120
Width = 1695
End
End
Attribute VB_Name = "FrmSlClient"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim rsVeiw As New ADODB.Recordset
Dim sql As String
sql = "select * from 客户表 where 客户名称 = '" & List1.Text & "'"
rsVeiw.Open sql, cn, adOpenKeyset
If rsVeiw.RecordCount = 1 Then
ClientName = rsVeiw("客户名称")
Linkman = rsVeiw("联系人")
PhoNumber = rsVeiw("联系电话")
rsVeiw.Close
ActiveReport1.Show
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Dim rsVeiw As New ADODB.Recordset
Dim sql As String
sql = "select * from 客户表 where 客户名称 = '" & List1.Text & "'"
rsVeiw.Open sql, cn, adOpenKeyset
If rsVeiw.RecordCount = 1 Then
ClientName = rsVeiw("客户名称")
FrmChCliInf.txtUserName.Text = rsVeiw("客户名称")
FrmChCliInf.TxtLinkMan.Text = rsVeiw("联系人")
FrmChCliInf.txtPhone.Text = rsVeiw("联系电话")
FrmChCliInf.txtBack.Text = rsVeiw("备注")
rsVeiw.Close
FrmChCliInf.Show
End If
End Sub
Private Sub Command4_Click()
Dim str As String
Dim rsTrade As New ADODB.Recordset
str = "select * from 交易统计表 where 客户名称 = " & "'" & List1.Text & "'"
rsTrade.Open str, cn, adOpenKeyset
ClientName = Trim(List1.Text)
If rsTrade.RecordCount > 1 Then
FrmChTraInf.Show
ElseIf rsTrade.RecordCount < 1 Then
MsgBox "没有此客户的交易记录!"
ElseIf rsTrade.RecordCount = 1 Then
With FrmChTraInf
.DTrade.Value = rsTrade("交易日期")
.TxtClientName.Text = rsTrade("客户名称")
.TxtBackup.Text = rsTrade("备注")
.TxtNum.Text = rsTrade("数量")
.TxtPaper.Text = rsTrade("用纸要求")
.TxtSingle.Text = rsTrade("单价")
.TxtSize.Text = rsTrade("尺寸")
.TxtSum.Text = rsTrade("总金额")
.txtBindType = rsTrade("装订方式")
End With
rsTrade.Close
FrmChTraInf.Show
End If
End Sub
Private Sub Form_Load()
Me.Width = 2895
Me.Height = 3120
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -