ADO Method:
Use the 'CREATE TABLE' SQL statement..
CREATE TABLE "table_name"
("column 1" "data_type_for_column_1",
"column 2" "data_type_for_column_2",
... )
ADOX Method
Sub ADOCreateTable()
Dim cat As New ADOX.Catalog
Dim tbl As New ADOX.Table
' Open the catalog
cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=.\NorthWind.mdb;"
' Create a new Table object.
With tbl
.Name = "Contacts"
' Create fields and append them to the new Table
' object. This must be done before appending the
' Table object to the Tables collection of the
' Catalog.
.Columns.Append "ContactName", adVarWChar
.Columns.Append "ContactTitle", adVarWChar
.Columns.Append "Phone", adVarWChar
.Columns.Append "Notes", adLongVarWChar
.Columns("Notes").Attributes = adColNullable
End With
' Add the new table to the database.
cat.Tables.Append tbl
Set cat = Nothing
End Sub
Taken from the Migrating from DAO to ADO document:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndao/html/daot
oado.asp

Signature
Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
--
> Hi All,
>
[quoted text clipped - 4 lines]
>
> Gavin.