📄 工资添加.frm
字号:
VERSION 5.00
Begin VB.Form 工资添加
Caption = "Form4"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4365
LinkTopic = "Form4"
ScaleHeight = 3090
ScaleWidth = 4365
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 2640
TabIndex = 11
Top = 2400
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 375
Left = 960
TabIndex = 10
Top = 2400
Width = 975
End
Begin VB.TextBox Text5
Height = 375
Left = 840
TabIndex = 9
Top = 1680
Width = 1455
End
Begin VB.TextBox Text4
Height = 375
Left = 3000
TabIndex = 8
Top = 960
Width = 1095
End
Begin VB.TextBox Text3
Height = 375
Left = 840
TabIndex = 7
Top = 960
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
Left = 3000
TabIndex = 6
Top = 240
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 840
TabIndex = 5
Top = 240
Width = 855
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "金额"
Height = 180
Left = 240
TabIndex = 4
Top = 1800
Width = 360
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "月份"
Height = 180
Left = 2280
TabIndex = 3
Top = 1080
Width = 360
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "部门号"
Height = 180
Left = 240
TabIndex = 2
Top = 1080
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "职工号"
Height = 180
Left = 2280
TabIndex = 1
Top = 360
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "编号"
Height = 180
Left = 240
TabIndex = 0
Top = 360
Width = 360
End
End
Attribute VB_Name = "工资添加"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rst As New ADODB.Recordset '定义Recordset对象
Dim strSql As String
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "工资信息不完整,请输入编号!", vbInformation + vbOKCancel + vbApplicationModal, "提示"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "工资信息不完整,请输入职工号!", vbInformation + vbOKCancel + vbApplicationModal, "提示"
Exit Sub
End If
If Text3.Text = "" Then
MsgBox "工资信息不完整,请输入部门号!", vbInformation + vbOKCancel + vbApplicationModal, "提示"
Exit Sub
End If
If Text4.Text = "" Then
MsgBox "工资信息不完整,请输入月份!", vbInformation + vbOKCancel + vbApplicationModal, "提示"
Exit Sub
End If
If Text5.Text = "" Then
MsgBox "工资信息不完整,请输入金额!", vbInformation + vbOKCancel + vbApplicationModal, "提示"
Exit Sub
End If
If rst.State = adStateOpen Then
rst.Close
End If
strSql = "insert into gzxx values('" + Trim(Text1.Text) + "','" + Trim(Text2.Text) + "','" + Trim(Text3.Text) + "','" + Trim(Text4.Text) + "','" + Trim(Text5.Text) + "')"
rst.Open strSql, cnn, 1, 1
MsgBox "成功添加工资信息!", vbInformation + vbOKOnly + vbApplicationModal, "提示"
Call Form7.Info
Form7.Show
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
Form7.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -