?? 教師基本情況表.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form3
Caption = "Form3"
ClientHeight = 5985
ClientLeft = 60
ClientTop = 345
ClientWidth = 7425
Icon = "教師基本情況表.frx":0000
LinkTopic = "Form3"
ScaleHeight = 5985
ScaleWidth = 7425
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 360
Top = 6000
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Password=315613;Persist Security Info=True;User ID=sa;Initial Catalog=wt;Data Source=wt"
OLEDBString = "Provider=SQLOLEDB.1;Password=315613;Persist Security Info=True;User ID=sa;Initial Catalog=wt;Data Source=wt"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "teacher"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "教師基本情況表.frx":08FF
Height = 1815
Left = 120
TabIndex = 12
Top = 3960
Width = 7095
_ExtentX = 12515
_ExtentY = 3201
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Frame Frame2
Caption = "功能"
Height = 3735
Left = 4200
TabIndex = 11
Top = 120
Width = 3015
Begin VB.CommandButton Command9
Caption = "下一個"
Height = 375
Left = 1800
TabIndex = 21
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command8
Caption = "上一個"
Height = 375
Left = 1800
TabIndex = 20
Top = 1800
Width = 1095
End
Begin VB.CommandButton Command7
Caption = "返回"
Height = 375
Left = 960
TabIndex = 19
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "取消"
Height = 375
Left = 1800
TabIndex = 18
Top = 1080
Width = 1095
End
Begin VB.CommandButton Command5
Caption = "保存"
Height = 375
Left = 1800
TabIndex = 17
Top = 360
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "搜索"
Height = 375
Left = 120
TabIndex = 16
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "修改"
Height = 375
Left = 120
TabIndex = 15
Top = 1800
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "刪除"
Height = 375
Left = 120
TabIndex = 14
Top = 1080
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 375
Left = 120
TabIndex = 13
Top = 360
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "教師基本情況表"
Height = 3735
Left = 120
TabIndex = 0
Top = 120
Width = 3855
Begin VB.TextBox Text1
DataField = "t_title"
DataSource = "Adodc1"
Height = 270
Index = 4
Left = 1320
TabIndex = 10
Text = "Text1"
Top = 3120
Width = 2295
End
Begin VB.TextBox Text1
DataField = "t_birthday"
DataSource = "Adodc1"
Height = 270
Index = 3
Left = 1320
TabIndex = 9
Text = "Text1"
Top = 2400
Width = 2295
End
Begin VB.TextBox Text1
DataField = "t_sex"
DataSource = "Adodc1"
Height = 270
Index = 2
Left = 1320
TabIndex = 8
Text = "Text1"
Top = 1800
Width = 855
End
Begin VB.TextBox Text1
DataField = "t_name"
DataSource = "Adodc1"
Height = 270
Index = 1
Left = 1320
TabIndex = 7
Text = "Text1"
Top = 1080
Width = 2295
End
Begin VB.TextBox Text1
DataField = "t_no"
DataSource = "Adodc1"
Height = 270
Index = 0
Left = 1320
TabIndex = 6
Text = "Text1"
Top = 360
Width = 2295
End
Begin VB.Label Label1
Caption = "教師號"
Height = 375
Index = 4
Left = 480
TabIndex = 5
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "教師姓名"
Height = 375
Index = 3
Left = 480
TabIndex = 4
Top = 1080
Width = 735
End
Begin VB.Label Label1
Caption = "性別"
Height = 375
Index = 2
Left = 480
TabIndex = 3
Top = 1800
Width = 735
End
Begin VB.Label Label1
Caption = "職稱"
Height = 375
Index = 1
Left = 480
TabIndex = 2
Top = 3120
Width = 735
End
Begin VB.Label Label1
Caption = "出生日期"
Height = 375
Index = 0
Left = 480
TabIndex = 1
Top = 2400
Width = 735
End
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
On Error GoTo apperr
Adodc1.Recordset.AddNew '添加一組記錄
For i = 0 To 4
Text1(i).Text = "" '清除文本框內(nèi)容
Next
Exit Sub
apperr:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
Dim de As String
On Error GoTo delerr
de = MsgBox("確信刪除這組記錄嗎?", vbQuestion + vbOKCancel, "刪除確定") '創(chuàng)建刪除確認窗口
If de = 1 Then
Adodc1.Recordset.Delete '刪除記錄
Adodc1.Recordset.MoveNext '移至上一組記錄
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.EOF Then '是否移記錄指針至盡頭
Adodc1.Recordset.MoveLast '移至最后一組記錄
End If
End If
Exit Sub '跳離本程序
delerr:
MsgBox Err.Description '顯示錯誤信息
End If
End Sub
Private Sub Command4_Click()
Form3.Hide
Form6.Show
End Sub
Private Sub Command5_Click()
Dim position As Variant
Dim s As String
On Error GoTo updateerr
Adodc1.Recordset.Update '將數(shù)據(jù)寫入數(shù)據(jù)庫
Adodc1.Refresh '重新排序
Exit Sub '跳離本程序
updateerr:
MsgBox Err.Description '顯示錯誤信息
End Sub
Private Sub Command6_Click()
On Error GoTo cancelerr
Adodc1.Recordset.CancelUpdate '取消數(shù)據(jù)寫入
Exit Sub
cancelerr:
MsgBox Err.Description
End Sub
Private Sub Command7_Click()
Form3.Hide
MDIForm1.Show
End Sub
Private Sub Command8_Click()
If Adodc1.Recordset.BOF = False Then
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF = True Then
Adodc1.Recordset.MoveNext
MsgBox "這是第一條記錄,返回最后一條記錄!", vbOKOnly + vbExclamation, "警告"
Adodc1.Recordset.MoveLast
End If
End If
End Sub
Private Sub Command9_Click()
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF = True Then
Adodc1.Recordset.MovePrevious
MsgBox "這是最后一條記錄,返回第一條記錄!", vbOKOnly + vbExclamation, "警告"
Adodc1.Recordset.MoveFirst
End If
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -