Article ID: 198504
Article Last Modified on 6/23/2005
-or-
' ****************************************************************
' 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
Additional query words: prb
Keywords: kberrmsg kbprb KB198504