Yahoo奇摩知識+將於 2021 年 5 月 4 日 (美國東部時間) 終止服務。自 2021 年 4 月 20 日 (美國東部時間) 起,Yahoo奇摩知識+服務將會轉為唯讀模式。其他Yahoo奇摩產品與服務或您的Yahoo奇摩帳號都不會受影響。如需關於Yahoo奇摩知識+ 停止服務以及下載您個人資料的資訊,請參閱說明網頁。
2 個解答
- 1 0 年前最佳解答
Dim colind As Integer
Dim rowind As Integer
'get the count of fields, add 1 for the blank left column
StatGrid.Cols = Data1.Recordset.Fields.count + 1
'set one row to start to fill in headings
Data1.Recordset.MoveFirst
StatGrid.Rows = 1
StatGrid.row = 0
'set width of first column to make it look like datagrid
StatGrid.ColWidth(0) = 400
'go through all the fields and set column headings
For colind = 1 To Data1.Recordset.Fields.count
StatGrid.Col = colind
StatGrid.Text = Data1.Recordset.Fields(colind - 1).Name
Next colind
'now put the data from the recordset into the fields
rowind = 0
While Not Data1.Recordset.EOF
StatGrid.Rows = rowind + 2 'set number of rows to include header
StatGrid.row = rowind + 1 'go to the last row
'go across the columns
For colind = 1 To Data1.Recordset.Fields.count
StatGrid.Col = colind
If (IsNull(Data1.Recordset.Fields(colind - 1).value)) Then
StatGrid.Text = ""
Else
StatGrid.Text = CStr(Data1.Recordset.Fields(colind -
1).value)
End If
Next colind
rowind = rowind + 1
Data1.Recordset.MoveNext
Wend
2006-07-20 13:09:17 補充:
是的...^________^