📄 main_jypx.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 main_jypx
BackColor = &H00D0E8EE&
BorderStyle = 1 'Fixed Single
Caption = "教育培训信息"
ClientHeight = 4035
ClientLeft = 45
ClientTop = 330
ClientWidth = 7575
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4035
ScaleWidth = 7575
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -1110
Top = 2640
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RSDAGLXT"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 教育培训信息表"
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 VB.CommandButton CmdExit
BackColor = &H00FFC0C0&
Caption = "&E 退出"
Height = 390
Left = 5475
Style = 1 'Graphical
TabIndex = 6
Top = 3540
Width = 1950
End
Begin VB.CommandButton CmdDelete
BackColor = &H00FFC0C0&
Caption = "&D 删除"
Height = 390
Left = 2130
Style = 1 'Graphical
TabIndex = 5
Top = 3540
Width = 1950
End
Begin VB.CommandButton CmdAdd
BackColor = &H00FFC0C0&
Caption = "&A 添加"
Height = 390
Left = 60
Style = 1 'Graphical
TabIndex = 4
Top = 3540
Width = 1950
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "main_jypx.frx":0000
Height = 2010
Left = 60
TabIndex = 3
Top = 1425
Width = 7440
_ExtentX = 13123
_ExtentY = 3545
_Version = 393216
BackColor = 16777215
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
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 = 9
BeginProperty Column00
DataField = "ID"
Caption = "ID"
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
BeginProperty Column02
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 Column03
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 Column04
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 Column05
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 Column06
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 Column07
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 Column08
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
ColumnWidth = 450.142
EndProperty
BeginProperty Column01
ColumnWidth = 705.26
EndProperty
BeginProperty Column02
ColumnWidth = 764.787
EndProperty
BeginProperty Column03
ColumnWidth = 810.142
EndProperty
BeginProperty Column04
ColumnWidth = 1349.858
EndProperty
BeginProperty Column05
ColumnWidth = 1094.74
EndProperty
BeginProperty Column06
ColumnWidth = 794.835
EndProperty
BeginProperty Column07
ColumnWidth = 824.882
EndProperty
BeginProperty Column08
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin VB.Frame Frame1
BackColor = &H00D0E8EE&
Height = 690
Left = 60
TabIndex = 0
Top = 660
Width = 7455
Begin VB.CommandButton CmdFind
BackColor = &H00FFC0C0&
Caption = "查询"
Height = 390
Left = 5565
Style = 1 'Graphical
TabIndex = 7
Top = 180
Width = 1755
End
Begin VB.TextBox Text1
Height = 300
Left = 1755
TabIndex = 2
Text = " 请输入要查询的内容"
Top = 240
Width = 3720
End
Begin VB.ComboBox Combo1
Height = 300
Left = 135
TabIndex = 1
Text = "Combo1"
Top = 240
Width = 1560
End
End
Begin VB.Label Label10
Appearance = 0 'Flat
BackColor = &H00FFC0C0&
BorderStyle = 1 'Fixed Single
Caption = " 教育培训信息"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C000C0&
Height = 375
Left = 2040
TabIndex = 8
Top = 150
Width = 3270
End
End
Attribute VB_Name = "main_jypx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'向combo1控件中添加查询所需的字段
Combo1.AddItem ("工号")
Combo1.AddItem ("姓名")
Combo1.AddItem ("部门名称")
Combo1.AddItem ("培训名称")
Combo1.ListIndex = 0
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text1.SetFocus '按【Enter】键,使Text1控件获得焦点
End Sub
Private Sub Text1_GotFocus()
Text1.SelStart = 0 '设置选定的起始位置
Text1.SelLength = Len(Text1.Text) '设置选定的长度。
End Sub
Private Sub CmdAdd_Click()
'加载窗体
Load main_jypx_lr
main_jypx_lr.Show
End Sub
Private Sub CmdFind_Click()
'按选择的字段和输入的内容查询教育培训信息
Adodc1.RecordSource = "select * from 教育培训信息表 where (教育培训信息表." & Combo1.Text & " like + '" + Text1.Text + "'+'%')"
Adodc1.Refresh
End Sub
Private Sub CmdDelete_Click()
'删除教育培训信息
Dim a As String
If Adodc1.Recordset.RecordCount > 0 Then
a = MsgBox("您确实要删除这条数据吗?", vbYesNo)
If a = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Refresh
End If
Else
MsgBox ("没有要删除的数据!")
End If
End Sub
Private Sub CmdExit_Click()
' Call CmdEnd(Me)
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -