Fields

The Fields collection contains a Field object for each column in the Recordset. You can refer to a particular field by name or by index. The Fields collection supports the Count property.

The following code example shows how to use the Fields collection to get all the field names from the MSysTables table.

Dim rs, n
Set rs = CreateObject("adoce.recordset")
rs.open "MSysTables"
For n = 0 to rs.Fields.Count -1
Msgbox rs.Fields(n).Name
Next