📄 frminvedit.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmInvEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑客户服务调查"
ClientHeight = 5505
ClientLeft = 45
ClientTop = 330
ClientWidth = 5670
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5505
ScaleWidth = 5670
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "客户信息"
Height = 1455
Left = 120
TabIndex = 9
Top = 120
Width = 5415
Begin VB.TextBox txtContact
Height = 330
Left = 1200
TabIndex = 19
Top = 600
Width = 1575
End
Begin MSDataListLib.DataCombo dco_Customer
Height = 330
Left = 1200
TabIndex = 16
Top = 210
Width = 3975
_ExtentX = 7011
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSDataListLib.DataCombo dco_Problem
Height = 330
Left = 1200
TabIndex = 15
Top = 1005
Width = 3975
_ExtentX = 7011
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "被调查人"
Height = 180
Left = 240
TabIndex = 14
Top = 682
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户单位"
Height = 180
Left = 240
TabIndex = 11
Top = 285
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "问题描述"
Height = 180
Left = 240
TabIndex = 10
Top = 1080
Width = 720
End
End
Begin VB.CommandButton Cmd_Cancel
BackColor = &H80000000&
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3143
MouseIcon = "FrmInvEdit.frx":0000
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 8
Top = 4920
Width = 1185
End
Begin VB.CommandButton Cmd_Ok
BackColor = &H80000000&
Caption = "确 定"
Height = 400
Left = 1343
MouseIcon = "FrmInvEdit.frx":030A
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 4920
Width = 1185
End
Begin VB.Frame Frame2
Caption = "服务调查"
Height = 3015
Left = 120
TabIndex = 0
Top = 1680
Width = 5415
Begin VB.ComboBox ComboWay
Height = 300
ItemData = "FrmInvEdit.frx":0614
Left = 1200
List = "FrmInvEdit.frx":0616
TabIndex = 17
Text = "电话"
Top = 240
Width = 1335
End
Begin VB.ComboBox ComboEva
Height = 300
ItemData = "FrmInvEdit.frx":0618
Left = 3840
List = "FrmInvEdit.frx":061A
TabIndex = 12
Text = "ComboEva"
Top = 240
Width = 1335
End
Begin VB.TextBox txtSummary
Height = 1815
Left = 1200
MaxLength = 20
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 645
Width = 3975
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "调查方式"
Height = 180
Left = 240
TabIndex = 18
Top = 300
Width = 720
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "总体评价"
Height = 180
Left = 2880
TabIndex = 13
Top = 300
Width = 720
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户意见"
Height = 180
Left = 240
TabIndex = 6
Top = 720
Width = 720
End
Begin VB.Label lblInvDate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblInvdate"
Height = 180
Left = 3960
TabIndex = 5
Top = 2640
Width = 900
End
Begin VB.Label lblPoster
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblPoster"
Height = 180
Left = 1200
TabIndex = 4
Top = 2640
Width = 810
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "调查日期"
Height = 180
Left = 2880
TabIndex = 3
Top = 2640
Width = 720
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "调查人"
Height = 180
Left = 240
TabIndex = 2
Top = 2640
Width = 540
End
End
Begin MSAdodcLib.Adodc AdoCustomer
Height = 330
Left = 120
Top = 4800
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "AdoCustomer"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc AdoProblem
Height = 330
Left = 3600
Top = 4800
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "AdoProblem"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "FrmInvEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriInvId As Long
Public OriCustId As Long
Public Modify As Boolean
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
'判断用户录入数据的有效性
If Len(Trim(dco_Customer.Text)) = 0 Then
MsgBox "请选择被调查客户名称"
dco_Customer.SetFocus
Exit Sub
End If
If Len(Trim(txtContact)) = 0 Then
MsgBox "请选择被调查人"
txtContact.SetFocus
Exit Sub
End If
If Len(Trim(dco_Problem.Text)) = 0 Then
MsgBox "请选择调查针对的问题"
dco_Problem.SetFocus
Exit Sub
End If
If Len(Trim(ComboWay.Text)) = 0 Then
MsgBox "请输入调查方式"
ComboWay.SetFocus
Exit Sub
End If
If Len(Trim(ComboEva.Text)) = 0 Then
MsgBox "请输入客户的总体评价"
ComboEva.SetFocus
Exit Sub
End If
If Len(Trim(txtSummary)) = 0 Then
MsgBox "请输入客户意见和建议"
txtSummary.SetFocus
Exit Sub
End If
'更新客户调查表Investigate
With MyInv
.CustId = Val(dco_Customer.BoundText)
.Contact = Trim(txtContact)
.ProId = Val(dco_Problem.BoundText)
.Evaluate = Trim(ComboEva.Text)
.InvWay = Trim(ComboWay.Text)
.Summary = Trim(txtSummary)
.InvDate = Trim(lblInvDate)
.Poster = Trim(lblPoster)
If Modify = False Then
.Insert
Else
.Update (OriInvId)
End If
End With
Unload Me
End Sub
Private Sub LoadCustomer()
AdoCustomer.ConnectionString = Conn
AdoCustomer.RecordSource = "SELECT * FROM BaseInfo Where Flag=3 ORDER BY Id"
AdoCustomer.Refresh
Set dco_Customer.RowSource = AdoCustomer
dco_Customer.ListField = "BaseName"
dco_Customer.BoundColumn = "Id"
End Sub
Private Sub LoadProblem()
AdoProblem.ConnectionString = Conn
AdoProblem.RecordSource = "SELECT ProId,Title FROM SrvProblem WHERE CustId=" _
+ Trim(OriCustId) + " ORDER BY ProId"
AdoProblem.Refresh
Set dco_Problem.RowSource = AdoProblem
dco_Problem.ListField = "Title"
dco_Problem.BoundColumn = "ProId"
End Sub
Private Sub dco_Customer_Change()
OriCustId = Val(dco_Customer.BoundText)
LoadProblem
End Sub
Private Sub Form_Load()
LoadCustomer
ComboWay.AddItem "电话", 0
ComboWay.AddItem "传真", 1
ComboWay.AddItem "电子邮件", 2
ComboWay.AddItem "信函", 3
ComboWay.ListIndex = 0
ComboEva.AddItem "满意", 0
ComboEva.AddItem "一般", 1
ComboEva.AddItem "不满意", 2
ComboEva.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -