Function GetFieldCount()
Dim rs1 As Recordset
Set rs1 = CurrentDb.OpenRecordset("SELECT * FROM myTable")
msgbox rs1.Fields.Count
set rs1=nothing
End function
Function GetFieldCount()
Dim rs1 As Recordset, I As Integer
Set rs1 = CurrentDb.OpenRecordset("SELECT * FROM myTable")
MsgBox rs1.Fields.Count ' 列
For I = 0 To rs1.Fields.Count - 1
MsgBox rs1.Fields(I).Name '名称
Next I
Set rs1 = Nothing
End Function