What's it supposed to be for an AutoNumber field. Access documentation says it's "AutoNumber", but so far no cigar.Code:CurrentDb.Execute "CREATE TABLE tblLog2 (ID AutoNumber, LogEvent text) "
What's it supposed to be for an AutoNumber field. Access documentation says it's "AutoNumber", but so far no cigar.Code:CurrentDb.Execute "CREATE TABLE tblLog2 (ID AutoNumber, LogEvent text) "
Since Allen Browne is way smarter than I am, I'll just post a link to his article... http://allenbrowne.com/func-DAO.html#CreateTableDAO
if you look near the top of the article, there's a example of creating an identity column with autonumber turned on. It's the very first example.
(He does it using DAO, not SQL).
There are actually two errors, AutoNumber is one and Text is the other. Statement should read:
Code:CurrentDb.Execute "CREATE TABLE tblLog2 (ID Counter, LogEvent Char)"
There's no such data type as Counter. CHAR every time I have ever seen it is a single character.
Read the article. Really.