> I believe you use Identity rather than Autonumber.
>
[quoted text clipped - 3 lines]
> >
> > DoCmd.RunSQL "CREATE TABLE tblTest(XYZ Datetime);"
Sorry, that's what I get for not looking it up.
DoCmd.RunSQL "CREATE TABLE tblTest(XYZ Counter)"

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
>I get the same error message with:
>
[quoted text clipped - 9 lines]
>> >
>> > DoCmd.RunSQL "CREATE TABLE tblTest(XYZ Datetime);"
Del - 28 Sep 2006 15:51 GMT
Thanks, that works.

Signature
Thank you,
Del
> Sorry, that's what I get for not looking it up.
>
[quoted text clipped - 13 lines]
> >> >
> >> > DoCmd.RunSQL "CREATE TABLE tblTest(XYZ Datetime);"
RoyVidar - 28 Sep 2006 18:59 GMT
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
message <#78SMqp4GHA.3600@TK2MSFTNGP03.phx.gbl>:
> Sorry, that's what I get for not looking it up.
>
[quoted text clipped - 16 lines]
>>> http://I.Am/DougSteele
>>> (no private e-mails, please)
The identity syntax works, but on an ADO connection, for instance
CurrentProject.Connection.Execute _
"CREATE TABLE tblTest(XYZ Int Identity);"

Signature
Roy-Vidar