📄 出差管理.frm
字号:
VERSION 5.00
Begin VB.Form 出差管理
Caption = "出差管理"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 7575
LinkTopic = "Form4"
ScaleHeight = 3195
ScaleWidth = 7575
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\大作业\企业考勤管理系统\公司考勤管理系统\自己动手\爵哥\爵哥\db1.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 2280
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "出差管理"
Top = 7320
Width = 6015
End
Begin VB.Frame Frame2
Caption = "出差信息"
Height = 2535
Left = 1080
TabIndex = 8
Top = 4200
Width = 8535
Begin VB.TextBox Text5
Height = 375
Left = 1440
TabIndex = 18
Top = 240
Width = 2175
End
Begin VB.TextBox Text9
Height = 375
Left = 1440
TabIndex = 17
Top = 2040
Width = 6375
End
Begin VB.TextBox Text8
Height = 375
Left = 1440
TabIndex = 15
Top = 1440
Width = 6375
End
Begin VB.TextBox Text7
Height = 375
Left = 1440
TabIndex = 13
Top = 840
Width = 6375
End
Begin VB.TextBox Text6
Height = 375
Left = 5520
TabIndex = 11
Top = 240
Width = 2055
End
Begin VB.Label Label10
Caption = "备注"
Height = 255
Left = 600
TabIndex = 16
Top = 2160
Width = 615
End
Begin VB.Label Label9
Caption = "出差任务"
Height = 255
Left = 600
TabIndex = 14
Top = 1560
Width = 735
End
Begin VB.Label Label8
Caption = "出差目的"
Height = 255
Left = 600
TabIndex = 12
Top = 960
Width = 735
End
Begin VB.Label Label7
Caption = "结束日期"
Height = 255
Left = 4560
TabIndex = 10
Top = 360
Width = 735
End
Begin VB.Label Label6
Caption = "开始日期"
Height = 255
Left = 600
TabIndex = 9
Top = 360
Width = 855
End
End
Begin VB.Frame Frame1
Caption = "职工信息"
Height = 1695
Left = 1080
TabIndex = 3
Top = 2640
Width = 8535
Begin VB.TextBox Text2
Height = 375
Left = 5280
TabIndex = 7
Top = 720
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
Left = 1200
MaxLength = 6
TabIndex = 5
Top = 600
Width = 1695
End
Begin VB.Label Label3
Caption = "部门ID"
Height = 255
Left = 4440
TabIndex = 6
Top = 840
Width = 615
End
Begin VB.Label Label2
Caption = "职工ID"
Height = 255
Left = 360
TabIndex = 4
Top = 720
Width = 615
End
End
Begin VB.CommandButton Command2
Caption = "关闭窗体"
Height = 495
Left = 6360
TabIndex = 2
Top = 1560
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "保存记录"
Height = 495
Left = 2040
TabIndex = 1
Top = 1560
Width = 1815
End
Begin VB.Label Label1
Caption = "出差管理"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4440
TabIndex = 0
Top = 600
Width = 1815
End
End
Attribute VB_Name = "出差管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim n As Integer
Command1.Enabled = True
Do While Len(Text1) <> 6
If Len(Text1) <> 6 Then
MsgBox ("职工号有误")
Text1 = InputBox("请再次输入职工号")
End If
Loop
Do While Len(Text5) <> 10
n = n + 1
If n > 3 Then
End
End If
If Len(Text5) <> 10 Then
MsgBox ("开始日期有误")
Text5 = InputBox("请再次输入开始日期")
End If
Loop
Do While Len(Text6) <> 10
If Len(Text6) <> 10 Then
MsgBox ("结束日期有误")
Text6 = InputBox("请再次输入结束日期")
End If
Loop
Data1.Recordset.AddNew
Data1.Recordset.Fields("职工ID") = Text1
Data1.Recordset.Fields("部门ID") = Text2
Data1.Recordset.Fields("开始日期") = Text5
Data1.Recordset.Fields("结束日期") = Text6
Data1.Recordset.Fields("出差目的") = Text7
Data1.Recordset.Fields("出差描述") = Text8
Data1.Recordset.Fields("备注") = Text9
Data1.Recordset.Update
Data1.Refresh
Command1.Enabled = False
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -