📄 frmstudentmsg.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmStudentMsg
BorderStyle = 1 'Fixed Single
Caption = "学生基本信息"
ClientHeight = 3900
ClientLeft = 4740
ClientTop = 3690
ClientWidth = 5475
Icon = "frmStudentMsg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3900
ScaleWidth = 5475
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1320
TabIndex = 14
Top = 960
Width = 1335
_ExtentX = 2355
_ExtentY = 661
_Version = 393216
Format = 85065729
CurrentDate = 38697
End
Begin VB.TextBox Text5
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 13
Top = 4200
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3600
TabIndex = 12
Top = 3360
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
Height = 375
Left = 1800
TabIndex = 11
Top = 3360
Width = 1575
End
Begin VB.TextBox Text4
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 1080
TabIndex = 10
Top = 2280
Width = 4215
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 8
Top = 1680
Width = 3855
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "frmStudentMsg.frx":0BF2
Left = 3720
List = "frmStudentMsg.frx":0BFC
TabIndex = 5
Text = "Combo1"
Top = 960
Width = 1575
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3720
TabIndex = 3
Top = 240
Width = 1575
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 1
Top = 240
Width = 1575
End
Begin VB.Label Label6
Caption = "备注:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 9
Top = 2280
Width = 615
End
Begin VB.Label Label5
Caption = "家庭住址:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 7
Top = 1680
Width = 975
End
Begin VB.Label Label4
Caption = "性别:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 6
Top = 960
Width = 615
End
Begin VB.Label Label3
Caption = "出生年月:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 4
Top = 960
Width = 975
End
Begin VB.Label Label2
Caption = "学号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 2
Top = 240
Width = 615
End
Begin VB.Label Label1
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 615
End
End
Attribute VB_Name = "frmStudentMsg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo DoError
i = MsgBox("确定要修改么?", vbOKCancel + vbInformation, "修改")
If i = 1 Then
frmStudent.rsStudent.Update
Unload Me
Else
frmStudent.rsStudent.CancelUpdate
Unload Me
End If
Exit Sub
DoError:
MsgBox "请先查询记录[" + Str(err.Number) + "]" + err.Description, vbOKOnly + vbInformation, "错误"
End Sub
Private Sub Command2_Click()
On Error GoTo DoError
frmStudent.rsStudent.CancelUpdate
Unload Me
Exit Sub
DoError:
MsgBox "请先查询记录[" + Str(err.Number) + "]" + err.Description, vbOKOnly + vbInformation, "错误"
Unload Me
End Sub
Private Sub DTPicker1_Change()
Text5.Text = Str(DTPicker1.Value)
Text5.SetFocus
End Sub
Private Sub Form_Load()
Set Text1.DataSource = frmStudent.rsStudent
Text1.DataField = "STUNAME"
Set Text2.DataSource = frmStudent.rsStudent
Text2.DataField = "STUNO"
' Set DTPicker1.DataSource = frmStudent.rsStudent
' DTPicker1.DataField = "STUBIRTH"
Set Combo1.DataSource = frmStudent.rsStudent
Combo1.DataField = "STUSEX"
Set Text3.DataSource = frmStudent.rsStudent
Text3.DataField = "STUADRESS"
Set Text4.DataSource = frmStudent.rsStudent
Text4.DataField = "STUOTHER"
Set Text5.DataSource = frmStudent.rsStudent
Text5.DataField = "STUBIRTH"
If Text5.Text = "" Then
DTPicker1.Value = Date
Else
DTPicker1.Value = CDate(Text5.Text)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -