📄 pingfenchaxun.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form pingfenchaxun
Caption = "评分查询"
ClientHeight = 4905
ClientLeft = 60
ClientTop = 450
ClientWidth = 8985
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 4905
ScaleWidth = 8985
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 2175
Left = 120
TabIndex = 4
Top = 2400
Width = 8535
_ExtentX = 15055
_ExtentY = 3836
_Version = 393216
Rows = 4
Cols = 7
FixedCols = 2
End
Begin VB.Frame Frame1
Caption = "查询信息"
Height = 1335
Left = 120
TabIndex = 0
Top = 840
Width = 8535
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 6000
TabIndex = 3
Top = 480
Width = 855
End
Begin VB.TextBox Text2
Height = 375
Left = 2880
TabIndex = 2
Top = 480
Width = 2655
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "寝 室 号:"
Height = 180
Left = 1560
TabIndex = 1
Top = 600
Width = 900
End
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "评分查询"
BeginProperty Font
Name = "幼圆"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 3720
TabIndex = 5
Top = 240
Width = 1440
End
End
Attribute VB_Name = "pingfenchaxun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mrc As ADODB.Recordset
Dim MsgText As String
Public txtSQL As String
Private Sub Command1_Click()
Dim txtSQL As String
Dim MsgText As String
Dim mrc As ADODB.Recordset
'/////////////////////////////////////
If Trim(Me.Text2.Text = "") Then
MsgBox "请输入寝室号", 0, "提示"
Me.Text2.SetFocus
Exit Sub
End If
txtSQL = "select * from qinshi_pingfen where qinshi_ID = '" & Trim(Me.Text2.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
'////////////////////////////////////////////////////////////////
txtSQL = txtSQL & " order by qinshi_ID "
Set mrc = ExecuteSQL(txtSQL, MsgText)
With MSFlexGrid1
.Rows = 2
.CellAlignment = 4
.TextMatrix(0, 0) = "寝 室 号"
.TextMatrix(0, 1) = "评分结果"
.TextMatrix(0, 2) = "第 几 周"
.TextMatrix(0, 3) = "年 份"
.TextMatrix(0, 4) = "其它描述"
Do While Not mrc.EOF
.Rows = .Rows + 1
.CellAlignment = 4
.TextMatrix(.Rows - 2, 0) = mrc.Fields(0)
.TextMatrix(.Rows - 2, 1) = mrc.Fields(1)
.TextMatrix(.Rows - 2, 2) = mrc.Fields(2)
.TextMatrix(.Rows - 2, 3) = mrc.Fields(3)
.TextMatrix(.Rows - 2, 4) = mrc.Fields(4)
mrc.MoveNext
Loop
End With
mrc.Close
End Sub
Private Sub Form_Load()
Call loading
End Sub
Private Sub loading()
With Me.MSFlexGrid1
.TextMatrix(0, 0) = "寝 室 号"
.TextMatrix(0, 1) = "评分结果"
.TextMatrix(0, 2) = "第 几 周"
.TextMatrix(0, 3) = "年 份"
.TextMatrix(0, 4) = "其它描述"
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -