This property indicates the number of fields in a recordset.
Syntax
fields.Count
Parameters
fields
Specifies the Fields collection of an open recordset.
Example
The following code example shows how to display the number of fields in the system table MsysIndexes using the Count property.
Dim rs
Set rs = CreateObject("adoce.recordset")
rs.Open "MSysIndexes"
MsgBox rs.Fields.Count
rs.Close
Set rs = Nothing
The following code example shows how to loop through a table and display the names of the fields using the Count property.
Dim rs, n
Set rs = CreateObject("adoce.recordset")
rs.Open "myTable"
For n = 0 to rs.Fields.Count -1
Msgbox rs.Fields(n).Name
Next