The following will rename the fields in the tables. If you need to propagate
these changes through other database objects, though (queries, forms,
reports, macros, modules, data access pages) you're going to have a fairly
major project on your hands ...
Public Sub RenameFields()
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set db = CurrentDb
For Each tdf In db.TableDefs
If Mid$(LCase$(tdf.Name), 2, 3) <> "sys" Then
For Each fld In tdf.Fields
If InStr(1, fld.Name, " ") > 0 Then
fld.Name = Replace(fld.Name, " ", "_")
End If
Next fld
End If
Next tdf
MsgBox "Finished"
End Sub