Code is like a box of chocolates.... 
Here is a function to return field names from a table. Maybe this will help you:
Code:
Sub test()
Dim fldlst As String
fldlst = listTableFields("YourTableName")
MsgBox fldlst
' Debug.Print fldlst
End Sub
Function listTableFields(sTblName As String) As String
Dim db As DAO.Database
Dim tblfld As DAO.TableDef
Dim fld As Field
Dim sListFields As String
Set db = CurrentDb()
Set tblfld = db.TableDefs(sTblName)
For Each fld In tblfld.Fields 'loop through all the fields of the table
sListFields = sListFields & fld.Name & ", "
Next
If Len(Trim(sListFields)) > 1 Then
sListFields = Left(sListFields, Len(Trim(sListFields)) - 1)
End If
'Debug.Print sListFields
listTableFields = sListFields
Error_Handler_Exit:
Set tblfld = Nothing
Set db = Nothing
Exit Function
End Function