A
Allen Browne
There are several ways to do this.
The most comprehensive is to use DAO. For examples, see help on
CreateTableDef(), CreateField(), CreateProperty(), etc. This lets you create
any type of field and property you would want to. There are a few things
such as the Decimal field type that you cannot create with DAO, but those
things generally don't work properly anyway.
Another alternative is to use a Data Definition Language query, such as:
CREATE TABLE Table1 (MyID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY);
A third alternative is to use the ADOX library. Not recommended: many bugs,
and differences between versions.
The most comprehensive is to use DAO. For examples, see help on
CreateTableDef(), CreateField(), CreateProperty(), etc. This lets you create
any type of field and property you would want to. There are a few things
such as the Decimal field type that you cannot create with DAO, but those
things generally don't work properly anyway.
Another alternative is to use a Data Definition Language query, such as:
CREATE TABLE Table1 (MyID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY);
A third alternative is to use the ADOX library. Not recommended: many bugs,
and differences between versions.