📄 frmstudentupdate.frm
字号:
TabIndex = 5
Top = 960
Width = 1215
End
Begin VB.TextBox Text
Height = 375
Index = 0
Left = 1560
TabIndex = 3
Top = 360
Width = 1215
End
Begin VB.Label Label10
Caption = "备 注"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7560
TabIndex = 19
Top = 1560
Width = 1095
End
Begin VB.Label Label9
Caption = " 地 址"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 7080
TabIndex = 17
Top = 360
Width = 1455
End
Begin VB.Label Label8
Caption = "联系方式"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 15
Top = 2400
Width = 1095
End
Begin VB.Label Label7
Caption = "专 业"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3360
TabIndex = 13
Top = 1680
Width = 855
End
Begin VB.Label Label6
Caption = "年 级"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3240
TabIndex = 11
Top = 1080
Width = 1095
End
Begin VB.Label Label5
Caption = "院 别"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 9
Top = 360
Width = 975
End
Begin VB.Label Label4
Caption = "出生日期"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 7
Top = 2400
Width = 1215
End
Begin VB.Label Label3
Caption = "性别"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 6
Top = 1680
Width = 735
End
Begin VB.Label Label2
Caption = "姓名"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 4
Top = 960
Width = 1095
End
Begin VB.Label Label1
Caption = "学号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 2
Top = 360
Width = 855
End
End
Begin VB.Image imgTitleRestore
Height = 195
Left = 8160
Picture = "frmstudentupdate.frx":7A60
ToolTipText = "Maximize (Disabled)"
Top = 120
Visible = 0 'False
Width = 195
End
Begin VB.Image imgTitleclose
Height = 195
Left = 9720
Picture = "frmstudentupdate.frx":7CAA
ToolTipText = "Close"
Top = 120
Width = 195
End
Begin VB.Image imgTitleMaximize
Height = 195
Left = 8640
Picture = "frmstudentupdate.frx":7EF4
ToolTipText = "Maximize (Disabled)"
Top = 120
Visible = 0 'False
Width = 195
End
Begin VB.Image imgTitleHelp
Height = 210
Left = 9000
Picture = "frmstudentupdate.frx":813E
Stretch = -1 'True
Top = 120
Width = 210
End
Begin VB.Image imgTitleMinimize
Height = 210
Left = 9360
Picture = "frmstudentupdate.frx":8388
Stretch = -1 'True
Top = 120
Width = 210
End
Begin VB.Label lblTitle
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "添加学生信息"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 240
Left = 3600
TabIndex = 31
Top = 360
Width = 1530
End
Begin VB.Image Imageicon
Height = 315
Left = 2520
Picture = "frmstudentupdate.frx":85D2
Stretch = -1 'True
Top = 0
Width = 315
End
Begin VB.Image imgWindowBottomRight
Height = 450
Left = 1080
Picture = "frmstudentupdate.frx":A29C
Top = 0
Width = 285
End
Begin VB.Image imgWindowBottomLeft
Height = 450
Left = 720
Picture = "frmstudentupdate.frx":A9E6
Top = 0
Width = 285
End
Begin VB.Image imgTitleMain
Height = 450
Left = 0
Picture = "frmstudentupdate.frx":B130
Stretch = -1 'True
Top = 450
Width = 285
End
Begin VB.Image imgWindowBottom
Height = 450
Left = 360
Picture = "frmstudentupdate.frx":B87A
Stretch = -1 'True
Top = 480
Width = 285
End
Begin VB.Image imgTitleRight
Height = 450
Left = 360
Picture = "frmstudentupdate.frx":BFC4
Top = 0
Width = 285
End
Begin VB.Image imgTitleLeft
Height = 450
Left = 0
Picture = "frmstudentupdate.frx":C70E
Top = 0
Width = 285
End
Begin VB.Image imgWindowRight
Height = 450
Left = 720
Picture = "frmstudentupdate.frx":CE58
Stretch = -1 'True
Top = 480
Width = 285
End
Begin VB.Image imgWindowLeft
Height = 450
Left = 1080
Picture = "frmstudentupdate.frx":D5A2
Stretch = -1 'True
Top = 480
Width = 285
End
End
Attribute VB_Name = "frmstudentupdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset '用于记录集
Dim myBookmark As Variant
Dim mcclean As Boolean '用于标记是否修改了数据
Dim sign As Integer '用于标记是点击修改还是点击添加
Private Sub Form_Load()
MakeWindow Me
Dim txtSQL As String
Dim MsgText As String
Text(0).Enabled = False
Text(1).Enabled = False
Combo1.Enabled = False
Text(3).Enabled = False
Text(4).Enabled = False
Text(5).Enabled = False
Text(6).Enabled = False
Text(7).Enabled = False
Text(8).Enabled = False
Text(9).Enabled = False
txtSQL = "select * from student "
Set mrc = MyDB.ExecuteSQL(txtSQL, MsgText)
mrc.MoveFirst
Call viewData
myBookmark = mrc.Bookmark
mcclean = True
sign = 0
End Sub
Public Sub viewData()
Text(0).Text = mrc.Fields(0)
Text(1).Text = mrc.Fields(1)
Combo1.Text = mrc.Fields(2)
On Error Resume Next
Text(3).Text = mrc.Fields(3)
Text(4).Text = mrc.Fields(4)
Text(5).Text = mrc.Fields(5)
Text(6).Text = mrc.Fields(6)
Text(7).Text = mrc.Fields(7)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -