Too many fields defined.
Errors were encountered during save. Data types were not changed.
NOTE: You also receive this message if you add or modify fields in a report that is based on a table that has too many fields.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
' ****************************************************************
' Declarations section of the module
' ****************************************************************
Option Compare Database
Option Explicit
' ****************************************************************
' The Fill_Table() function creates a table in the current database
' named Field Test with 255 fields, each of which has a Text data
' type and a size of one character.
' ****************************************************************
Function Fill_Table()
Dim mydb As DAO.Database
Dim tbl As DAO.TableDef
Dim fld As DAO.Field
Dim i As Integer
Set mydb = CurrentDb()
Set tbl = mydb.CreateTableDef("Field Test")
For i = 0 To 254
Set fld = tbl.CreateField("Field" & CStr(i + 1))
fld.Type = dbText
fld.Size = 1
tbl.Fields.Append fld
Next i
mydb.TableDefs.Append tbl
End Function
Fill_Table
Keywords: KB198504, kbprb, kberrmsg