Column with auto-value

B

Bill Linares

I would like to have tables created with VBA have the first column be of
auto-value. I.e. each new row entry causes the column to increase by one.
How do you do that?

Thanks
 
D

Dan Artuso

Hi,
The easiest way would be to execute a SQL statement from VBA.
If you use CurrentDb.Execute with this statement:
CREATE TABLE Code3 (
ID AUTOINCREMENT,
Account TEXT(50),
Code MEMO,
Active Bit,
Hits int,
Rotation int
)

The ID column will be an auto-number
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top