📄 frmpredit.frm
字号:
VERSION 5.00
Begin VB.Form FrmPrEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑问题信息"
ClientHeight = 4920
ClientLeft = 45
ClientTop = 330
ClientWidth = 5910
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4920
ScaleWidth = 5910
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Ok
BackColor = &H80000000&
Caption = "确 定"
Height = 400
Left = 1395
MouseIcon = "FrmPrEdit.frx":0000
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 16
Top = 4320
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
BackColor = &H80000000&
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3195
MouseIcon = "FrmPrEdit.frx":030A
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 15
Top = 4320
Width = 1300
End
Begin VB.Frame Frame1
Height = 3975
Left = 240
TabIndex = 0
Top = 120
Width = 5415
Begin VB.TextBox txtMemo
Height = 735
Left = 1200
MaxLength = 20
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 7
Top = 2520
Width = 3975
End
Begin VB.TextBox txtDescribe
Height = 1095
Left = 1200
MaxLength = 20
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 6
Top = 1320
Width = 3975
End
Begin VB.ComboBox ComboType
Height = 300
ItemData = "FrmPrEdit.frx":0614
Left = 3840
List = "FrmPrEdit.frx":0624
Style = 2 'Dropdown List
TabIndex = 5
Top = 960
Width = 1335
End
Begin VB.ComboBox ComboLevel
Height = 300
ItemData = "FrmPrEdit.frx":0650
Left = 1200
List = "FrmPrEdit.frx":065D
Style = 2 'Dropdown List
TabIndex = 4
Top = 945
Width = 1335
End
Begin VB.TextBox txtTel
Height = 270
Left = 3840
MaxLength = 20
TabIndex = 3
Top = 600
Width = 1335
End
Begin VB.TextBox txtContact
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 2
Top = 600
Width = 1335
End
Begin VB.TextBox txtClient
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 1
Top = 240
Width = 3975
End
Begin VB.Label lblFillDate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblFilldate"
Height = 180
Left = 3840
TabIndex = 20
Top = 3480
Width = 990
End
Begin VB.Label lblFillin
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblFill_in"
Height = 180
Left = 1200
TabIndex = 19
Top = 3480
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "录入日期"
Height = 180
Left = 2880
TabIndex = 18
Top = 3480
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "录入人"
Height = 180
Left = 240
TabIndex = 17
Top = 3480
Width = 540
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注信息"
Height = 180
Left = 240
TabIndex = 14
Top = 2565
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "问题描述"
Height = 180
Left = 240
TabIndex = 13
Top = 1365
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "问题类型"
Height = 180
Left = 2880
TabIndex = 12
Top = 1020
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "严重级别"
Height = 180
Left = 240
TabIndex = 11
Top = 1005
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系电话"
Height = 180
Left = 2880
TabIndex = 10
Top = 645
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系人"
Height = 180
Left = 240
TabIndex = 9
Top = 645
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户单位"
Height = 180
Left = 240
TabIndex = 8
Top = 285
Width = 720
End
End
End
Attribute VB_Name = "FrmPrEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
'判断用户录入数据的有效性
'必须录入客户单位
If Trim(txtClient) = "" Then
MsgBox "请输入客户单位"
txtClient.SetFocus
Exit Sub
End If
'必须录入联系人
If Trim(txtContact) = "" Then
MsgBox "请输入联系人"
txtContact.SetFocus
Exit Sub
End If
'必须录入联系电话
If Trim(txtTel) = "" Then
MsgBox "请输入联系电话"
txtTel.SetFocus
Exit Sub
End If
'必须录入问题描述
If Trim(txtDescribe) = "" Then
MsgBox "请输入问题描述"
txtDescribe.SetFocus
Exit Sub
End If
'把用户录入的数据赋值到MyProRec对象中
With MyPrRec
.Cname = MakeStr(txtClient)
.Cperson = MakeStr(txtContact)
.Ctel = MakeStr(txtTel)
.Plevel = ComboLevel.Text
.Ptype = ComboType.Text
.Pdetail = txtDescribe
.Pcomment = txtMemo
.LogPerson = lblFillin
.Createdate = lblFillDate
'根据变量Modify的值,决定是插入新数据,还是修改已有的数据
If Modify = False Then
.Insert
Else
Call .Update(OriId)
End If
End With
'关闭窗体
Unload Me
End Sub
Private Sub txtClient_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtContact_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtTel_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -