?? dall.frm
字號(hào):
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form 檔案瀏覽
Caption = "學(xué)籍管理-檔案瀏覽"
ClientHeight = 4935
ClientLeft = 60
ClientTop = 450
ClientWidth = 14100
LinkTopic = "Form10"
ScaleHeight = 4935
ScaleWidth = 14100
StartUpPosition = 3 '窗口缺省
Begin MSFlexGridLib.MSFlexGrid MSF1
Height = 3375
Left = 60
TabIndex = 8
Top = 1500
Width = 13995
_ExtentX = 24686
_ExtentY = 5953
_Version = 393216
End
Begin VB.Frame Frame1
Height = 855
Left = 60
TabIndex = 0
Top = 540
Width = 13995
Begin VB.CommandButton Command2
Caption = "返回"
Height = 315
Left = 10590
TabIndex = 7
Top = 330
Width = 675
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 315
Left = 9480
TabIndex = 6
Top = 330
Width = 675
End
Begin VB.ComboBox Combo2
Height = 300
Left = 6480
Style = 2 'Dropdown List
TabIndex = 5
Top = 330
Width = 1935
End
Begin VB.ComboBox Combo1
Height = 300
Left = 3000
Style = 2 'Dropdown List
TabIndex = 3
Top = 330
Width = 1995
End
Begin VB.Label Label3
Caption = "班級"
Height = 255
Left = 5940
TabIndex = 4
Top = 390
Width = 615
End
Begin VB.Label Label2
Caption = "院系"
Height = 255
Left = 2400
TabIndex = 2
Top = 390
Width = 555
End
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "檔 案 瀏 覽"
BeginProperty Font
Name = "黑體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 60
TabIndex = 1
Top = 60
Width = 13965
End
End
Attribute VB_Name = "檔案瀏覽"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub dashowtitle()
Dim i As Integer
MSF1.Clear
With MSF1
.Cols = 15
.TextMatrix(0, 1) = "學(xué)號(hào)"
.TextMatrix(0, 2) = "姓名"
.TextMatrix(0, 3) = "性別"
.TextMatrix(0, 4) = "民族"
.TextMatrix(0, 5) = "血型"
.TextMatrix(0, 6) = "出生年月"
.TextMatrix(0, 7) = "所屬院系"
.TextMatrix(0, 8) = "所屬專業(yè)"
.TextMatrix(0, 9) = "所屬班級"
.TextMatrix(0, 10) = "聯(lián)系電話"
.TextMatrix(0, 11) = "郵編"
.TextMatrix(0, 12) = "籍貫"
.TextMatrix(0, 13) = "家庭住址"
.TextMatrix(0, 14) = "備注"
.ColWidth(0) = 200
.ColWidth(1) = 1000
.ColWidth(2) = 400
.ColWidth(3) = 400
.ColWidth(4) = 1000
.ColWidth(5) = 400
.ColWidth(6) = 1000
.ColWidth(7) = 1500
.ColWidth(8) = 1500
.ColWidth(9) = 1500
.ColWidth(10) = 800
.ColWidth(11) = 800
.ColWidth(12) = 800
.ColWidth(13) = 2500
.ColWidth(14) = 3000
.FixedRows = 1
.FillStyle = flexFillSingle
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Row = 1
End With
End Sub
'顯示MSFlexGrid的內(nèi)容
Public Sub dashowdata()
Dim j As Integer
Dim i As Integer
Dim mrc1 As ADODB.Recordset
Set mrc1 = ExecuteSQL(Trim(txtsql))
If mrc1.EOF = False Then
mrc1.MoveFirst
With MSF1
.Rows = 1
Do While Not mrc1.EOF
.Rows = .Rows + 1
For i = 1 To mrc1.Fields.Count
.TextMatrix(.Rows - 1, i) = mrc1.Fields(i - 1)
Next i
mrc1.MoveNext
Loop
mrc1.Close
End With
End If
End Sub
Private Sub Command1_Click()
Dim yxdm As String
Dim bjdm As String
If Combo1.Text = "" Then
MsgBox " 請選擇院系!", vbExclamation + vbOKOnly, "警告"
Combo1.SetFocus
Exit Sub
End If
If Combo2.Text = "" Then
MsgBox " 請選擇班級!", vbExclamation + vbOKOnly, "警告"
Combo2.SetFocus
Exit Sub
End If
Dim mrc As ADODB.Recordset
txtsql = "select * from 院系 where 院系名稱='" & Trim(Combo1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
yxdm = mrc.Fields(0)
mrc.Close
txtsql = "select * from 班級 where 班級名稱='" & Trim(Combo2.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
bjdm = mrc.Fields(0)
mrc.Close
txtsql = "select * from 學(xué)生基本信息 where 院系代碼='" & Trim(yxdm) & "' and 班級代碼='" & Trim(bjdm) & "'"
'Set mrc = ExecuteSQL(txtsql)
Me.dashowtitle
Me.dashowdata
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim mrc As ADODB.Recordset
txtsql = "select * from 院系"
Set mrc = ExecuteSQL(txtsql)
Do While Not mrc.EOF
Combo1.AddItem mrc.Fields(1)
mrc.MoveNext
Loop
mrc.Close
txtsql = "select * from 班級"
Set mrc = ExecuteSQL(txtsql)
Do While Not mrc.EOF
Combo2.AddItem mrc.Fields(1)
mrc.MoveNext
Loop
mrc.Close
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -