Sub LoopTablesFields()
'220109 s4p, Ade modify CurrentDb()
On Error GoTo Proc_Err
Dim db As DAO.Database _
,oTdf As DAO.TableDef _
,oFld As DAO.Field
Dim i As Integer
Set db = CurrentDb()
i = 0
'loop tables
For Each oTdf In db.TableDefs
With oTdf
'skip system tables
If Not Left(oTdf.Name,4) = "MSys" Then
'loop fields
For Each oFld In oTdf.Fields
i = i + 1
With oFld
Debug.Print Format(i, "000 ") & oTdf.Name _
& "." & oFld.Name
End With 'field
Next oFld
End If
End With 'table
Next oTdf
MsgBox "Done"
Proc_Exit:
On Error Resume Next
Set oFld = Nothing
Set oTdf = Nothing
Set db = Nothing
Exit Sub
Proc_Err:
MsgBox Err.Description _
,, "ERROR " & Err.Number & " LoopTablesFields"
Resume Proc_Exit
Resume
End Sub