Just walk the Fields collection ...
Public Sub ListFieldNames()
Dim rst As ADODB.Recordset
Dim fld As ADODB.Field
Set rst = New ADODB.Recordset
With rst
.ActiveConnection = CurrentProject.Connection
'replace 'tblSource' with name of your table
.Source = "SELECT * FROM tblSource"
For Each fld In .Fields
Debug.Print fld.Name
Next fld
End With
End Sub

Signature
Brendan Reynolds (MVP)
>I am trying to access the fields in an access table, through an ado
> recordset, (which works), but I am trying to loop through the filenames in
[quoted text clipped - 51 lines]
>
> Michael
MYKLIV - 27 Jul 2005 03:05 GMT
Brendan,
Thanks, it wasn't the exact solution, but it did put me on the right path !!
I have 5 sections of information on the form, and I have to loop through
each one. some are textboxes, some are combo's and some are checkboxes. Also,
as it turns out, I didn't need the .Name after all, I just used the .Value
instead.
Here's a small section of the code I used. It works great. Thanks again for
all of your help !!
Michael
Dim rstPaintAAR As ADODB.Recordset
Dim fld As ADODB.field
Dim sect As Integer, a As Integer
Dim x As Integer, xx As Integer
Dim check As String
Set rstPaintAAR = New ADODB.Recordset
rstPaintAAR.Open "qryDisplayAARByAARID", CurrentProject.Connection,
adOpenDynamic, adLockOptimistic
If sect = 4 Then
x = 100
xx = 1
Do Until x = 900
Do Until xx = 13
z = x + xx
check = "check" & CStr(z)
Forms!frmEditAAR!(check) = rstPaintAAR(a).Value
xx = xx + 1
a = a + 1
Loop
x = x + 100
Loop
sect = sect + 1
End If
> Just walk the Fields collection ...
>
[quoted text clipped - 72 lines]
> >
> > Michael