📄 dlgcj.frm
字号:
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 8
Left = 2520
TabIndex = 21
Top = 2040
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 7
Left = 2520
TabIndex = 20
Top = 1560
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 6
Left = 2520
TabIndex = 19
Top = 1080
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 5
Left = 2520
TabIndex = 18
Top = 600
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 4
Left = 360
TabIndex = 17
Top = 2520
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 3
Left = 360
TabIndex = 16
Top = 2040
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 2
Left = 360
TabIndex = 15
Top = 1560
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 1
Left = 360
TabIndex = 14
Top = 1080
Width = 510
End
Begin VB.Label LbK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Lbk"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Index = 0
Left = 360
TabIndex = 13
Top = 600
Width = 510
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 285
Left = 120
TabIndex = 0
Top = 120
Width = 915
End
End
Attribute VB_Name = "DlgCj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim RsKsh As ADODB.Recordset
Private Sub Check1_Click()
Dim i As Integer
If Check1.Value = 1 Then
For i = 0 To 9
TxtCj(i).Enabled = True
Next i
Else
RsKsh.CancelUpdate
For i = 0 To 9
TxtCj(i).Enabled = False
Next i
End If
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 9
LbK(i).Caption = IIf(IsNull(Trim(Xk(i))), "无", Trim(Xk(i)))
Next i
Set RsKsh = New ADODB.Recordset
RsKsh.Open "select * from 成绩表 where KSH =" & KSHLst, Con, adOpenStatic, adLockOptimistic, adCmdText
Display
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Check1.Value = 1 Then
If vbOK = MsgBox("确认要保存修改吗?", vbOKCancel, "保存对话框:") Then
Dim i As Integer
For i = 0 To 9
If LbK(i).Caption <> "无" Then
RsKsh.Fields(LbK(i).Caption) = CInt(IIf(Len(TxtCj(i).Text) = 0, "0", TxtCj(i).Text))
End If
Next i
RsKsh.Update
Exit Sub
End If
End If
End Sub
Private Sub TxtCj_KeyPress(Index As Integer, KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
End If
End Sub
Private Sub TxtPass_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If TxtPass.Text = "13912265004" Then Check1.Enabled = True
End If
End Sub
Private Sub Display()
On Error GoTo ErrLine
Dim i As Integer
For i = 0 To 9
If LbK(i).Caption <> "无" Then
TxtCj(i).Text = CInt(IIf(IsNull(RsKsh.Fields(LbK(i).Caption)), "0", RsKsh.Fields(LbK(i).Caption)))
End If
Next i
Exit Sub
ErrLine:
MsgBox "某学科不存在,不能显示此考生成绩!", 16, "请检查成绩库"
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -