📄 main_scgl_scfkgl_lr.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form main_scgl_scfkgl_lr
BorderStyle = 3 'Fixed Dialog
Caption = "Form1"
ClientHeight = 3060
ClientLeft = 45
ClientTop = 330
ClientWidth = 6300
Icon = "main_scgl_scfkgl_lr.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3060
ScaleWidth = 6300
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "确定"
Height = 390
Left = 1290
TabIndex = 8
Top = 2535
Width = 1770
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 390
Left = 3195
TabIndex = 7
Top = 2535
Width = 1770
End
Begin VB.Frame Frame1
Height = 2460
Left = 30
TabIndex = 0
Top = -60
Width = 6240
Begin MSComCtl2.DTPicker DTPicker1
Height = 300
Left = 1005
TabIndex = 21
Top = 1290
Width = 2325
_ExtentX = 4101
_ExtentY = 529
_Version = 393216
Format = 48693249
CurrentDate = 38738
End
Begin VB.TextBox Text1
Height = 330
Index = 5
Left = 4050
TabIndex = 20
Top = 2010
Width = 2070
End
Begin VB.CommandButton cmdQY
Caption = "…"
Height = 330
Left = 5775
TabIndex = 17
Top = 1635
Width = 375
End
Begin VB.TextBox Text1
Height = 330
Index = 3
Left = 1005
TabIndex = 16
Top = 1650
Width = 4770
End
Begin VB.TextBox txtbh
Enabled = 0 'False
Height = 330
Left = 5010
TabIndex = 15
Top = 180
Width = 1140
End
Begin VB.CommandButton cmdYWY
Caption = "…"
Height = 330
Left = 4500
TabIndex = 14
Top = 180
Width = 375
End
Begin VB.TextBox Text1
Height = 330
Index = 4
Left = 1005
TabIndex = 12
Top = 2010
Width = 2265
End
Begin VB.TextBox txtID
Enabled = 0 'False
Height = 330
Left = 5010
TabIndex = 10
Top = 540
Visible = 0 'False
Width = 1140
End
Begin VB.TextBox Text1
Height = 330
Index = 1
Left = 1005
TabIndex = 3
Top = 540
Width = 3495
End
Begin VB.TextBox Text1
Height = 330
Index = 2
Left = 1005
TabIndex = 2
Top = 900
Width = 5145
End
Begin VB.TextBox Text1
Height = 330
Index = 0
Left = 1005
TabIndex = 1
Top = 180
Width = 3495
End
Begin VB.Label Label7
Caption = "反馈形式"
Height = 165
Left = 3300
TabIndex = 19
Top = 2100
Width = 765
End
Begin VB.Label Label3
Caption = "区域负责人"
Height = 165
Left = 75
TabIndex = 18
Top = 2070
Width = 975
End
Begin VB.Label Label6
Caption = "反馈时间"
Height = 165
Left = 210
TabIndex = 13
Top = 1365
Width = 735
End
Begin VB.Label Label5
Caption = "所属区域"
Height = 165
Left = 195
TabIndex = 11
Top = 1740
Width = 765
End
Begin VB.Label lblID
BackStyle = 0 'Transparent
Caption = "ID"
Height = 180
Left = 4650
TabIndex = 9
Top = 600
Visible = 0 'False
Width = 225
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "业务员名称"
ForeColor = &H000000FF&
Height = 165
Left = 45
TabIndex = 6
Top = 255
Width = 975
End
Begin VB.Label Label2
Caption = "反馈项目"
Height = 165
Left = 225
TabIndex = 5
Top = 615
Width = 750
End
Begin VB.Label Label4
Caption = "反馈内容"
Height = 165
Left = 210
TabIndex = 4
Top = 990
Width = 810
End
End
End
Attribute VB_Name = "main_scgl_scfkgl_lr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset
Private Sub cmdCP_Click()
intCP = 1
Load main_cpxx
main_cpxx.Show 1
End Sub
Private Sub cmdQY_Click()
IntLoadDataTree = 4
Load main_datatree
main_datatree.Show 1
End Sub
Private Sub cmdYWY_Click()
main_yyxx.Tag = 3
Load main_yyxx
main_yyxx.Show 1
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text1(3).SetFocus
End Sub
Private Sub Form_Activate()
If IntLoadDataTree = 4 Then
Text1(4).SetFocus
Else
Text1(0).SetFocus
End If
End Sub
Private Sub Form_Load()
If blnAddSCFK = True Then
Me.Caption = "市场反馈信息添加"
For i = 1 To Text1.UBound
Text1(i) = ""
Next i
Else
Me.Caption = "市场反馈信息修改"
With main_scgl_scfkgl.Adodc1.Recordset
lblID.Visible = True
txtID.Visible = True
txtID.text = .Fields("ID")
txtbh.text = .Fields("业务员编号")
For i = 0 To 2
Text1(i) = .Fields(i + 2)
Next i
DTPicker1.Value = .Fields(5)
Text1(3) = .Fields(6)
Text1(4) = .Fields(7)
Text1(5) = .Fields(8)
End With
End If
End Sub
Private Sub Text1_GotFocus(Index As Integer)
Text1(Index).BackColor = &HFFFF00
Text1(Index).SelStart = 0
Text1(Index).SelLength = Len(Text1(Index))
End Sub
Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn And Index = 0 Then cmdYWY.SetFocus
If KeyCode = vbKeyReturn And Index = 1 Then Text1(2).SetFocus
If KeyCode = vbKeyReturn And Index = 2 Then DTPicker1.SetFocus
If KeyCode = vbKeyReturn And Index = 3 Then cmdQY.SetFocus
If KeyCode = vbKeyReturn And Index = 4 Then Text1(5).SetFocus
If KeyCode = vbKeyReturn And Index = 5 Then Command1.SetFocus
End Sub
Private Sub Text1_LostFocus(Index As Integer)
Text1(Index).BackColor = &H80000005
End Sub
Private Sub Command1_Click()
On Error GoTo SaveErr
If blnAddSCFK = True Then
Cnn.Execute ("insert into 市场反馈表 values('" + txtbh + "','" + Text1(0) + "','" + Text1(1) + "','" + Text1(2) + _
"','" + Str(DTPicker1) + "','" + Text1(3) + "','" + Text1(4) + "','" + Text1(5) + "')")
Else
Cnn.Execute ("update 市场反馈表 set 业务员编号='" + txtbh + "',业务员名称='" + Text1(0) + "',反馈项目='" + Text1(1) + _
"',反馈内容='" + Text1(2) + "',反馈时间='" + Str(DTPicker1) + "',所属区域='" + Text1(3) + "',区域负责人='" + Text1(4) + _
"',反馈形式='" + Text1(5) + "'where ID =" + txtID + "")
End If
main_scgl_scfkgl.Adodc1.Refresh
If SCFKBookmark <> "" Then main_scgl_scfkgl.DataGrid1.Bookmark = SCFKBookmark
Unload Me
Exit Sub
SaveErr:
MsgBox Err.Description
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -