求改一下代碼
Set rs = New ADODB.Recordsetrs.Open sql, conn, 1, 3
For i = 0 To rs.Fields.Count - 1
k = rs(i).Name
Set colx = ListView1.ColumnHeaders.Add()
colx.Text = k
colx.Width = ListView1.Width / rs.Fields.Count
Next
ListView1.ListItems.Clear
For c = 0 To rs.Fields.Count - 1
rs.MoveFirst
Set itmx = ListView1.ListItems.Add()
j = rs(c)
itmx = j
Next
Set rs = Nothing
這個代碼查詢的結果在ListView1中顯示到到一列中去了,我要橫向到8個例中對應顯示