📄 信息.frm
字号:
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 600
TabIndex = 3
Top = 840
Width = 480
End
End
Begin VB.Frame Frame2
Caption = "项目信息"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4455
Left = 120
TabIndex = 0
Top = 360
Width = 16815
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "信息.frx":0000
Height = 6000
Left = 0
TabIndex = 1
Top = 360
Width = 16515
_ExtentX = 29131
_ExtentY = 10583
_Version = 393216
AllowUpdate = -1 'True
BackColor = 14737632
HeadLines = 1
RowHeight = 20
AllowAddNew = -1 'True
AllowDelete = -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 = 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
End
Begin VB.Image Image1
Height = 11520
Left = 10200
Picture = "信息.frx":0015
Stretch = -1 'True
Top = 2760
Width = 15360
End
End
Attribute VB_Name = "xueshengxinxi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strSQL As String
Dim a As String
a = Text7.Text
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\ss.mdb;Persist Security Info=False"
strSQL = "SELECT * FROM 学生信息 where 学号='" & a & "'"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command6_Click()
Dim strSQL As String
Dim a As String
a = Text1.Text
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\ss.mdb;Persist Security Info=False"
strSQL = "SELECT * FROM 学生信息 where 楼层=" & a & ""
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command2_Click()
Dim strSQL As String
Dim a As String
a = Text8.Text
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\ss.mdb;Persist Security Info=False"
strSQL = "SELECT * FROM 学生信息 where 姓名='" & a & "'"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command3_Click()
Dim strSQL As String
Dim a As String
a = Text9.Text
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\ss.mdb;Persist Security Info=False"
strSQL = "SELECT * FROM 学生信息 where 性别='" & a & "'"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command4_Click()
Dim strSQL As String
Dim a As String
a = Text10.Text
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\ss.mdb;Persist Security Info=False"
strSQL = "SELECT * FROM 学生信息 where 学院='" & a & "'"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command5_Click()
Dim strSQL As String
Dim a As String
a = Text11.Text
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\ss.mdb;Persist Security Info=False"
strSQL = "SELECT * FROM 学生信息 where 寝室号='" & a & "'"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open strSQL, conn, adOpenStatic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
Private Sub Command7_Click()
Adodc1.Recordset.AddNew
Command7.Enabled = False
End Sub
Private Sub Command8_Click()
With Adodc1.Recordset
.Delete
.MoveNext
If .EOF Then .MoveFirst
End With
Command8.Enabled = False
End Sub
Private Sub Command9_Click()
Adodc1.Recordset.MoveFirst
MsgBox "您已经对该表进行了修改!"
End Sub
Private Sub Command12_Click()
Unload Me
xueshengxinxi.Show
End Sub
Private Sub Command11_Click()
Command7.Enabled = False
Command8.Enabled = False
Me.Hide
Form1.Show
End Sub
Private Sub Form_Activate()
Image1.Left = xueshengxinxi.ScaleLeft
Image1.Top = xueshengxinxi.ScaleTop
Image1.Width = xueshengxinxi.ScaleWidth
Image1.Height = xueshengxinxi.ScaleHeight
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\ss.mdb"
Adodc1.RecordSource = "select * from 学生信息"
Adodc1.Refresh
End Sub
Private Sub Text1_Change()
Text7.Text = " "
Text8.Text = " "
Text9.Text = " "
Text10.Text = " "
Text11.Text = " "
End Sub
Private Sub Text7_Change()
Text1.Text = " "
Text8.Text = " "
Text9.Text = " "
Text10.Text = " "
Text11.Text = " "
End Sub
Private Sub Text8_Change()
Text1.Text = " "
Text7.Text = " "
Text9.Text = " "
Text10.Text = " "
Text11.Text = " "
End Sub
Private Sub Text9_Change()
Text1.Text = " "
Text7.Text = " "
Text8.Text = " "
Text10.Text = " "
Text11.Text = " "
End Sub
Private Sub Text10_Change()
Text1.Text = " "
Text7.Text = " "
Text8.Text = " "
Text9.Text = " "
Text11.Text = " "
End Sub
Private Sub Text11_Change()
Text1.Text = " "
Text7.Text = " "
Text8.Text = " "
Text9.Text = " "
Text10.Text = " "
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -