Thomas said:
I'm guessing it's an Access version issue then. I'm use Access 2000. Seems
likely that this feature may not have been supported in such an earlier
version.
No, the issue is that the code demonstrated by Gramelspacher, is Jet
SQL, not Access SQL. It won't work in the interface, it will only work
when executed on an ADO/OLE DB connection. Well, in later versions
(2002+), you can switch to ANSI-92 mode, and be able to execute it
also through the interface.
Copy/Paste Gramelspachers code into a module, and execute it, and you
will get a table (at least I got one using that code with Access
2000/VBA)
Guess I'll live with the short coming for now. I'm already having fits with
AUTOINCRIMENT/IDENTITY anyway. In the "bigger picture" I'm trying to write
DDL scripts that will create equivalent database structures in MSSQL, MySQL
and Access... for many of the features I originally used in the design while
working in just one of these, the systems support and syntax is different
enough to make it next to impossible to support them all with one script.
So much for ANSI-standard.
Jet SQL is much closer to ANSI 92 than the Access dialect, it also
supports a several interesting features that are not supported through
the Access interface (check constraints, is one of them - if you search
these groups on that term, you will probably both find some controverse,
but also some quite interesting samples).
If you wish to use DDL, then, as stated above, you'll need to execute on
an ADO/OLE DB connection.
Here's one article with a bit more information
http://msdn2.microsoft.com/en-us/library/Aa140015(office.10).aspx
(also check out the Fundamental and Advanced articles, linked to in
the bottom of the article)