📄 frmbaseinput.frm
字号:
Begin VB.Menu MNU21
Caption = "依学号定位[&H]"
End
End
Begin VB.Menu MNUQH
Caption = "【功能切换&N】"
Begin VB.Menu MNUQH1
Caption = "数据查询[&S]"
End
Begin VB.Menu MNU31
Caption = "-"
End
Begin VB.Menu MNUQH2
Caption = "数据统计[&C]"
End
Begin VB.Menu MNU32
Caption = "-"
End
Begin VB.Menu MNUQH3
Caption = "全屏修改[&R]"
End
End
Begin VB.Menu MNULOCK
Caption = "【字段锁定&L】"
Begin VB.Menu MLOCK1
Caption = "学号"
Checked = -1 'True
End
Begin VB.Menu MLOCK2
Caption = "性别"
Checked = -1 'True
End
Begin VB.Menu MLOCK3
Caption = "民族"
Checked = -1 'True
End
Begin VB.Menu MLOCK4
Caption = "院系"
Checked = -1 'True
End
Begin VB.Menu MLOCK5
Caption = "户口属性"
Checked = -1 'True
End
Begin VB.Menu MLOCK6
Caption = "班级"
Checked = -1 'True
End
Begin VB.Menu MLOCK7
Caption = "年级"
Checked = -1 'True
End
Begin VB.Menu MLOCK8
Caption = "政治面貌"
Checked = -1 'True
End
Begin VB.Menu MLOCK9
Caption = "专业"
Checked = -1 'True
End
Begin VB.Menu MLOCK10
Caption = "学历"
Checked = -1 'True
End
Begin VB.Menu MLOCK11
Caption = "培养方式"
Checked = -1 'True
End
Begin VB.Menu MLOCK12
Caption = "宿舍"
Checked = -1 'True
End
Begin VB.Menu MLOCK13
Caption = "电话"
Checked = -1 'True
End
Begin VB.Menu MLOCK14
Caption = "身份证号"
Checked = -1 'True
End
Begin VB.Menu MLOCK15
Caption = "灵通卡号"
Checked = -1 'True
End
End
Begin VB.Menu MNUPRN
Caption = "【打印&P】"
Begin VB.Menu MNUPRNRESUME
Caption = "打印个人简历[&P]"
End
End
Begin VB.Menu MNU4
Caption = "【帮助&H】"
Begin VB.Menu MNU41
Caption = "使用说明[&H]"
End
End
End
Attribute VB_Name = "frmBaseInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim bModify As Boolean
Dim bQuery As Boolean
Dim BADDNEW As Boolean
Dim bDelete As Boolean
Dim REC As Recordset
Dim BookMark As Integer
Dim recCount As Integer
Dim ex As Excel.Application
Dim exwbook As Excel.WorkBook
Dim exsheet As Excel.WorkSheet
Dim exchart As Excel.Chart
Private Sub cboHKSX_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set hksx='" + Trim(cboHKSX) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
txtBJ.SetFocus
End If
End Sub
Private Sub cboMZ_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set mz='" + Trim(cboMZ) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
cboYX.SetFocus
End If
End Sub
Private Sub cboNJ_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set nj='" + Trim(cboNJ) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
cboSY.SetFocus
End If
End Sub
Private Sub cboPYFS_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set pyfs='" + Trim(cboPYFS) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
txtSFZHM.SetFocus
End If
End Sub
Private Sub cboSY_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set sy='" + Trim(cboSY) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
cboZZMM.SetFocus
End If
End Sub
Private Sub cboXB_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set xb='" + Trim(cboXB) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
cboMZ.SetFocus
End If
End Sub
Private Sub cboXL_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set xl='" + Trim(cboXL) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
txtTC.SetFocus
End If
End Sub
Private Sub cboYX_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set yx='" + Trim(cboYX) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
cboHKSX.SetFocus
End If
End Sub
Private Sub cboZZMM_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
On Error Resume Next
If KeyAscii = 13 Then
If bModify Then
sqlModify = "update zbqkb set zzmm='" + Trim(cboZZMM) + "' where id=" + Trim(REC!ID) + ""
Dbstudent.Execute sqlModify
End If
txtZY.SetFocus
End If
End Sub
Private Sub cmdAddnew_Click()
On Error Resume Next
AddnewStatus
InitItem
txtXH.SetFocus
End Sub
Private Sub cmdDelete_Click()
On Error Resume Next
Dim sqlDelete As String
If MsgBox("您确定要删除此条记录?", vbQuestion + vbOKCancel, "询问框") = vbOK Then
sqlDelete = "delete * from zbqkb where xh='" + Trim(REC!XH) + "'"
Dbstudent.Execute sqlDelete
sqlDelete = "delete * from jtqkb where xh='" + Trim(txtXH) + "'"
Dbstudent.Execute sqlDelete
UpdateQuery
Else
QueryStatus
End If
End Sub
Private Sub cmdExit_Click()
On Error Resume Next
Unload Me
End Sub
Private Sub cmdFirst_Click()
On Error Resume Next
StaBar1.Panels.Item(1) = "第" & CStr(BookMark) & "条"
StaBar1.Panels.Item(2) = "库中共有" & CStr(recCount) & "条记录"
If BADDNEW Then
UpdateQuery
End If
If bModify Then
If MsgBox("完成当前记录修改?", vbQuestion + vbYesNo) = vbYes Then
MsgBox "如果要继续修改" & vbCrLf & "请移到相应记录后" & "按修改键", vbInformation
QueryStatus
REC.MoveFirst
ShowRecord
BookMark = 1
End If
End If
If bQuery Then
BookMark = 1
REC.MoveFirst
ShowRecord
cmdSave.Caption = "保存"
End If
End Sub
Private Sub cmdLast_Click()
On Error Resume Next
StaBar1.Panels.Item(1) = "第" & CStr(BookMark) & "条"
StaBar1.Panels.Item(2) = "库中共有" & CStr(recCount) & "条记录"
If BADDNEW Then
UpdateQuery
End If
If bModify Then
If MsgBox("完成当前记录修改?", vbQuestion + vbYesNo) = vbYes Then
MsgBox "如果要继续修改" & vbCrLf & "请移到相应记录后" & "按修改键", vbInformation
QueryStatus
BookMark = recCount
REC.MoveLast
ShowRecord
End If
End If
If bQuery Then
BookMark = recCount
REC.MoveLast
ShowRecord
cmdSave.Caption = "保存"
End If
End Sub
Private Sub cmdModify_Click()
On Error Resume Next
ModifyStatus
End Sub
Private Sub cmdNext_Click()
On Error Resume Next
StaBar1.Panels.Item(1) = "第" & CStr(BookMark) & "条"
StaBar1.Panels.Item(2) = "库中共有" & CStr(recCount) & "条记录"
If BADDNEW Then
UpdateQuery
End If
If bModify Then
If MsgBox("完成当前记录修改?", vbQuestion + vbYesNo) = vbYes Then
MsgBox "如果要继续修改" & vbCrLf & "请移到相应记录后" & "按修改键", vbInformation
QueryStatus
If BookMark < recCount Then
BookMark = BookMark + 1
REC.MoveNext
End If
ShowRecord
End If
End If
If bQuery Then
If BookMark = recCount Then
MsgBox "这是最后一条记录", vbInformation + vbOKOnly, "提示框"
Else
BookMark = BookMark + 1
REC.MoveNext
ShowRecord
cmdSave.Caption = "保存"
End If
End If
End Sub
Private Sub cmdPrevious_Click()
On Error Resume Next
StaBar1.Panels.Item(1) = "第" & CStr(BookMark) & "条"
StaBar1.Panels.Item(2) = "库中共有" & CStr(recCount) & "条记录"
If BADDNEW Then
UpdateQuery
End If
If bModify Then
If MsgBox("完成当前记录修改?", vbQuestion + vbYesNo) = vbYes Then
MsgBox "如果要继续修改" & vbCrLf & "请移到相应记录后" & "按修改键"
QueryStatus
If BookMark > 1 Then
BookMark = BookMark - 1
REC.MovePrevious
End If
ShowRecord
End If
End If
If bQuery Then
If BookMark = 1 Then
MsgBox "这是第一条记录", vbInformation + vbOKOnly
Else
BookMark = BookMark - 1
REC.MovePrevious
ShowRecord
cmdSave.Caption = "保存"
End If
End If
End Sub
Private Sub cmdSave_Click()
If cmdSave.Caption = "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -