John,
It looks like your code is trying to manipulate the AllowZeroLength
property as if it were a property of the table. This property does not
apply to the table itself, only to fields.
I believe this is how I would do it:
Sub TurnOnAllowZeroLength()
Dim MyDB As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim intCount As Integer
Set MyDB = DBEngine(0)(0)
For Each tdf In dbs.TableDefs
If tdf.Name Like "MSys*" Then
' ignore
Else
For Each fld In tdf.Fields
If fld.Type = "Text" Then
fld.AllowZeroLength = True
intCount = intCount + 1
End If
Next fld
End If
Next tdf
If intCount > 0 Then
MsgBox "The Allow Zero Length property for " & intCount & "
tables has been set to 'Yes'."
Else
MsgBox "No change needed"
End If
Set dbs = Nothing
End Sub
Having said that, I must agree with Aaron that this is an odd thing to
be doing. The Allow Zer Length property is set to Yes by default in
Access, and most developers routinely change it to No.