Public Function FixDefaultOfZero() As Byte
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 Len(tdf.Connect) > 0 Or Left(tdf.Name, 4) = "MSys" Then
'Do nothing
Else
Debug.Print tdf.Name
For Each fld In tdf.Fields
Select Case fld.Type
Case dbBigInt, dbByte, dbCurrency, dbDecimal, dbDouble, dbFloat, _
dbInteger, dbLong, dbNumeric, dbSingle
fld.DefaultValue = "Null" 'Note that the DefaultValue
'property expects a STRING
End Select
Next
End If
Next
Set fld = Nothing
Set tdf = Nothing
Set db = Nothing
End Function