📄 frm当月修改.frm
字号:
Width = 1545
End
Begin VB.TextBox txtFields
DataField = "工号"
DataSource = "datPrimaryRS"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Index = 0
Left = 750
MaxLength = 6
TabIndex = 0
Top = 30
Width = 855
End
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 420
Left = 0
ScaleHeight = 420
ScaleWidth = 9090
TabIndex = 45
Top = 4245
Width = 9090
Begin VB.CommandButton cmd定位
Caption = "定位(&S)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 6720
TabIndex = 93
Top = 30
Width = 1095
End
Begin VB.CommandButton cmd放弃
Caption = "放弃(&Q)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2070
TabIndex = 40
Top = 30
Width = 975
End
Begin VB.CommandButton cmd保存
Caption = "保存(&S)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1080
TabIndex = 39
Top = 30
Width = 975
End
Begin VB.CommandButton cmd删除
Caption = "删除(&E)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 3150
TabIndex = 41
Top = 30
Width = 975
End
Begin VB.CommandButton cmd增加
Caption = "增加(&A)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 90
TabIndex = 38
Top = 30
Width = 975
End
Begin VB.CommandButton cmd替换
Caption = "替换(&R)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 4140
TabIndex = 42
Top = 30
Width = 975
End
Begin VB.CommandButton cmd锁定
Caption = "锁定项目(&L)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 5310
TabIndex = 43
Top = 30
Width = 1395
End
Begin VB.CommandButton cmd关闭
Caption = "关闭(&C)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 7950
TabIndex = 44
Top = 30
Width = 975
End
End
Begin VB.Data datPrimaryRS
Align = 2 'Align Bottom
Caption = " "
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 435
Left = 0
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 4665
Width = 9090
End
Begin VB.Label lblLabels
Caption = "长城卡号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 3
Left = 5580
TabIndex = 52
Top = 30
Width = 1125
End
Begin VB.Line Line2
BorderColor = &H00808080&
BorderWidth = 2
X1 = 30
X2 = 9060
Y1 = 4260
Y2 = 4260
End
Begin VB.Line Line1
BorderColor = &H00808080&
BorderWidth = 2
X1 = 60
X2 = 9090
Y1 = 420
Y2 = 420
End
Begin VB.Label lblLabels
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 2
Left = 3960
TabIndex = 48
Top = 30
Width = 675
End
Begin VB.Label lblLabels
Caption = "部门:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 1
Left = 1680
TabIndex = 47
Top = 30
Width = 615
End
Begin VB.Label lblLabels
Caption = "工号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 0
Left = 60
TabIndex = 46
Top = 30
Width = 615
End
End
Attribute VB_Name = "frm数据修改"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim hxfsq
Dim hxfjd As Integer
Dim char As String * 1
Option Explicit
Private Sub cmd保存_Click()
If Len(Trim(txtFields(0).Text)) > 0 And Len(Trim(txtFields(1).Text)) > 0 And Len(Trim(txtFields(2).Text)) > 0 Then
If (dwccklb = "普通卡" And (Len(Trim(txtFields(3).Text)) = 16 Or Len(Trim(txtFields(3).Text)) = 0)) Or (dwccklb = "借记卡" And (Len(Trim(txtFields(3).Text)) = 19 Or Len(Trim(txtFields(3).Text)) = 0)) Then
datPrimaryRS.UpdateRecord
datPrimaryRS.Recordset.Bookmark = datPrimaryRS.Recordset.LastModified
cmd保存.Enabled = False
cmd放弃.Enabled = False
cmd增加.Enabled = True
cmd删除.Enabled = True
cmd替换.Enabled = True
cmd锁定.Enabled = True
cmd关闭.Enabled = True
cmd定位.Enabled = True
frmMAIN.StatusBar1.Panels(2).Text = "共" & Val(datPrimaryRS.Recordset.RecordCount) & "记录"
datPrimaryRS.Refresh
Else
hxfyn = MsgBox("卡号位数错误!普通卡卡号应为16位,借记卡卡号应为19位,请核对!", 48)
End If
Else
hxfyn = MsgBox("工号、部门、姓名不能为空!,请输入!", 48)
End If
End Sub
Private Sub cmd定位_Click()
HXFFHBJ = False
HXFGH = ""
frm定位.Show 1
If HXFFHBJ = True Then
datPrimaryRS.Recordset.MoveFirst
Do While Not datPrimaryRS.Recordset.EOF And Trim(datPrimaryRS.Recordset("工号")) <> Trim(HXFGH)
datPrimaryRS.Recordset.MoveNext
If datPrimaryRS.Recordset.EOF Then Exit Do
Loop
If datPrimaryRS.Recordset.EOF Then
hxfyn = MsgBox("指定工号不存在!", 48)
datPrimaryRS.Recordset.MoveFirst
End If
End If
End Sub
Private Sub cmd放弃_Click()
If datPrimaryRS.Recordset.RecordCount > 0 Then
datPrimaryRS.Recordset.Bookmark = hxfsq
End If
cmd保存.Enabled = False
cmd放弃.Enabled = False
cmd增加.Enabled = True
cmd删除.Enabled = True
cmd替换.Enabled = True
cmd锁定.Enabled = True
cmd关闭.Enabled = True
cmd定位.Enabled = True
Me.Refresh
End Sub
Private Sub cmd关闭_Click()
Screen.MousePointer = vbDefault
Unload Me
End Sub
Private Sub cmd删除_Click()
hxfyn = MsgBox("是否真的删除?", 36)
If hxfyn = vbYes Then
With datPrimaryRS.Recordset
If Not .EOF Then
.Delete
.MoveNext
If .EOF And .RecordCount <> 0 Then .MoveLast
If .EOF And .RecordCount = 0 Then .MoveFirst
End If
End With
End If
End Sub
Private Sub cmd锁定_Click()
If hxfsdbj = False Then
hxfyn = 0
frm锁定字段选择.Show 1
If HXFFHBJ = True And hxfyn > 0 Then
hxfi = 0
Do While hxfi <= 37
If hxfi <> hxfyn + 3 Then
lblLabels(hxfi).Enabled = False
txtFields(hxfi).Enabled = False
End If
hxfi = hxfi + 1
Loop
hxfsdbj = True
cmd锁定.Caption = "解锁(&
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -