📄 frmupdateid.frm
字号:
VERSION 5.00
Begin VB.Form frmUpdateID
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Caption = "修改学生基本信息"
ClientHeight = 1425
ClientLeft = 45
ClientTop = 330
ClientWidth = 3480
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1425
ScaleWidth = 3480
Begin VB.TextBox txtID
Height = 330
Left = 1545
TabIndex = 2
Top = 240
Width = 1485
End
Begin VB.CommandButton CmdOK
Caption = "确认修改"
Default = -1 'True
Height = 420
Left = 360
TabIndex = 1
Top = 825
Width = 1050
End
Begin VB.CommandButton CmdQuit
Cancel = -1 'True
Caption = "返回"
Height = 420
Left = 2025
TabIndex = 0
Top = 825
Width = 1050
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Caption = "请输入学号:"
Height = 240
Left = 450
TabIndex = 3
Top = 285
Width = 1185
End
End
Attribute VB_Name = "frmUpdateID"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public sID As String
Private Sub CmdOK_Click()
Dim sCon As String
If txtID.Text = "" Then
txtID.Text = "请输学号"
txtID.SelStart = 0
txtID.SelLength = Len(txtID.Text)
txtID.SetFocus
Exit Sub
End If
sCon = "select * from student where id='" & txtID.Text & "'"
Set adoRS = adoCon.Execute(sCon)
If adoRS.EOF Then
MsgBox "对不起,查无此人,请执行系统查询功能," _
& vbCrLf & vbCrLf & "确认要修改的学号后再进行修改。", _
vbInformation + vbOKOnly, "系统提示"
txtID.SetFocus
txtID.SelStart = 0
txtID.SelLength = Len(txtID.Text)
Exit Sub
Else
sID = Trim(txtID.Text)
FrmStudentUpdate.Show
Unload Me
End If
End Sub
Private Sub cmdQuit_Click()
Unload Me
End Sub
Private Sub Form_Load()
frmUpdateID.Move (Screen.Width - frmUpdateID.Width) / 2, (Screen.Height - frmUpdateID.Height) / 2 - 800
frmUpdateID.Show
txtID.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -