Public Sub classshowtitle()
Dim i As Integer
MSF1.Clear
With MSF1
.Cols = 8
.TextMatrix(0, 1) = "年级"
.TextMatrix(0, 2) = "班级"
.TextMatrix(0, 3) = "教室"
.TextMatrix(0, 4) = "年制"
.TextMatrix(0, 5) = "专业"
.TextMatrix(0, 6) = "班主任"
.TextMatrix(0, 7) = "备注"
.ColWidth(0) = 100
.ColWidth(1) = 1300
.ColWidth(2) = 1200
.ColWidth(3) = 800
.ColWidth(4) = 800
.ColWidth(5) = 800
.ColWidth(6) = 800
.ColWidth(7) = 5000
.FixedRows = 1
For i = 1 To 7
.ColAlignment(i) = 0
Next i
.FillStyle = flexFillSingle
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Row = 1
End With
End Sub
Public Sub classshowdata()
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
Else
If classfind = True Then
Formclass2.Hide
Formclass3.Show
zzz = MsgBox("对不起,没有此班级的档案记录!", vbOKOnly, "查询")
Formclass3.ZOrder (0)
Formclass3.Text1(0).SetFocus
End If
End If
End Sub
特别是有row 这些地方,不知道他定义的这些数据是什么意思?
[此贴子已经被作者于2006-6-9 20:13:02编辑过]