Skip to content

04 CreateTable

AndrewMB2 edited this page Nov 13, 2025 · 3 revisions

CreateTable method

Creates a new table in an Access database. Returns True if successful, otherwise False.

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
Xd Arrdata or RsetData object Object from which the table should be created.
TblName String Name of new table.
LongTextFields Value or array (optional) Field names which should be long text.
Keys Value or array (optional) Key fields.

CreateTable creates a new table in an Access database (using ADOX) from an ArrData or RsetData object (but not a TableData object as data types can not be accurately determined). Text fields are normally limited to 255 characters, but any identified by the LongTextFields parameter are set to memo data type. Primary keys are set up if supplied.

There must already be an open connection to an Access database. Once the table has been created, the data from Xd is copied into the table. If the table already exists, it will be replaced (though the UpdateFrom method will normally be a more efficient way of carrying out updates).

03 How To

04 Property and Method Reference

Clone this wiki locally