• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

15. Programming DAO: Data Definition Lan... > 15.3. Creating a Table and Its Field...

Creating a Table and Its Fields

Tables are created using the CreateTableDef method of a Database object. The full syntax of this method is:

SetTableDefVar = DatabaseVar.CreateTableDef _
([TableDefName[, attributes[, source[, connect]]]])

where:

  • TableDefName is a string or string variable holding the name of the new TableDef object.

  • For information about the optional parameters, see the Access help system.

Notes

  • The new TableDef object must be appended to the TableDefs collection using the Append method. However, before appending, the table must have at least one field.

  • CreateTableDef does not check for an already used TableDefName. If TableDefName does refer to an object already in the TableDefs collection, an error will occur when you use the Append method, but not before.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint