📄 frmprojedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmProjEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑问题信息"
ClientHeight = 3480
ClientLeft = 45
ClientTop = 330
ClientWidth = 5865
Icon = "FrmProjEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3480
ScaleWidth = 5865
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Ok
BackColor = &H80000000&
Caption = "确 定"
Height = 400
Left = 1382
MouseIcon = "FrmProjEdit.frx":1272
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 2880
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
BackColor = &H80000000&
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3182
MouseIcon = "FrmProjEdit.frx":157C
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 8
Top = 2880
Width = 1300
End
Begin VB.Frame Frame1
Height = 2535
Left = 240
TabIndex = 9
Top = 120
Width = 5415
Begin VB.TextBox txtFinishDate
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 6
Top = 1680
Width = 1335
End
Begin VB.TextBox txtBenefit
Height = 270
Left = 3840
MaxLength = 20
TabIndex = 5
Top = 1320
Width = 1335
End
Begin VB.TextBox txtAmount
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 4
Top = 1320
Width = 1335
End
Begin VB.TextBox txtProj
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 0
Top = 240
Width = 3975
End
Begin VB.TextBox txtTel
Height = 270
Left = 3840
MaxLength = 20
TabIndex = 3
Top = 960
Width = 1335
End
Begin VB.TextBox txtContact
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 2
Top = 960
Width = 1335
End
Begin VB.TextBox txtClient
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 1
Top = 600
Width = 3975
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "项目名称"
Height = 180
Left = 240
TabIndex = 20
Top = 285
Width = 720
End
Begin VB.Label lblFilldate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblFilldate"
Height = 180
Left = 3840
TabIndex = 19
Top = 2085
Width = 990
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "录入日期"
Height = 180
Left = 2880
TabIndex = 18
Top = 2085
Width = 720
End
Begin VB.Label lblFillin
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblFill_in"
Height = 180
Left = 1200
TabIndex = 17
Top = 2085
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "录入人"
Height = 180
Left = 240
TabIndex = 16
Top = 2085
Width = 540
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "完成日期"
Height = 180
Left = 240
TabIndex = 15
Top = 1725
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "预算利润"
Height = 180
Left = 2880
TabIndex = 14
Top = 1380
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "预算金额"
Height = 180
Left = 240
TabIndex = 13
Top = 1365
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系电话"
Height = 180
Left = 2880
TabIndex = 12
Top = 1005
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系人"
Height = 180
Left = 240
TabIndex = 11
Top = 1005
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户单位"
Height = 180
Left = 240
TabIndex = 10
Top = 645
Width = 720
End
End
End
Attribute VB_Name = "FrmProjEdit"
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()
Dim TmpId As String
'判断用户输入的数据是否有效
If Trim(txtProj) = "" Then
MsgBox "请输入项目名称"
txtProj.SetFocus
Exit Sub
End If
If Trim(txtClient) = "" Then
MsgBox "请输入客户单位"
txtClient.SetFocus
Exit Sub
End If
'把用户输入的数据赋值到MyProj对象中
With MyProj
.ProjName = MakeStr(txtProj)
.Client = MakeStr(txtClient)
.Contact = MakeStr(txtContact)
.Ctel = MakeStr(txtTel)
.Amount0 = Val(txtAmount)
.Benefit0 = Val(txtBenefit)
.FinishDate0 = MakeStr(txtFinishDate)
.ApplyEmp = CurUser.Ename
.ApplyDate = Format(Now, "yyyy-mm-dd")
'如果Modify=False,则插入新数据;否则更新已有的数据
If Modify = False Then
.Insert
Else
Call .Update(OriId)
End If
End With
Unload Me
End Sub
Private Sub txtAmount_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtBenefit_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
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 txtFinishDate_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtProj_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtTel_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtReceive_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -