I need a routine to enumerate through all tables and if the field type is
'Number', I would like to change the format to 'Standard'.
Why?
Table datasheets aren't appropriate for viewing or printing data, and you can
set the format of a textbox in a Form or Report to default to Standard (if
indeed it doesn't do so already).
However if you want...
Dim tdf As DAO.Tabledef
Dim fld As DAO.Field
Dim db As DAO.Database
Set db = CurrentDb
For Each tdf In db.Tabledefs
' exclude system tables
If Left(tdf.Name, 4) <> "MSYS" Then
For Each fld In tdf.Fields
Select Case fld.Type
Case dbInteger, dbLong, dbSingle, dbDouble, dbDecimal
fld.Format = "Standard"
Case Else
' do nothing
End Select
End If
Next tdf
Untested air code, back up your database first of course!!!