Column with auto-value

  • Thread starter Thread starter Bill Linares
  • Start date Start date
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
 
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
 
Back
Top