A Amy Blankenship Jul 11, 2006 #1 When you're creating a table definition, what is the constant to make a field an autonumber vs an integer? TIA; Amy
When you're creating a table definition, what is the constant to make a field an autonumber vs an integer? TIA; Amy
D Douglas J. Steele Jul 11, 2006 #2 How are you creating the table? If you're using DAO, you need to set the field's Attribute to include dbAutoIncrField Set tdf = dbs.CreateTableDef("Contacts") Set fld1 = tdf.CreateField("ContactID", dbLong) fld1.Attributes = fld1.Attributes + dbAutoIncrField If you're using DDL, the type is COUNTER.
How are you creating the table? If you're using DAO, you need to set the field's Attribute to include dbAutoIncrField Set tdf = dbs.CreateTableDef("Contacts") Set fld1 = tdf.CreateField("ContactID", dbLong) fld1.Attributes = fld1.Attributes + dbAutoIncrField If you're using DDL, the type is COUNTER.
A Amy Blankenship Jul 11, 2006 #3 Thanks a bunch! Douglas J. Steele said: How are you creating the table? If you're using DAO, you need to set the field's Attribute to include dbAutoIncrField Set tdf = dbs.CreateTableDef("Contacts") Set fld1 = tdf.CreateField("ContactID", dbLong) fld1.Attributes = fld1.Attributes + dbAutoIncrField If you're using DDL, the type is COUNTER. Click to expand...
Thanks a bunch! Douglas J. Steele said: How are you creating the table? If you're using DAO, you need to set the field's Attribute to include dbAutoIncrField Set tdf = dbs.CreateTableDef("Contacts") Set fld1 = tdf.CreateField("ContactID", dbLong) fld1.Attributes = fld1.Attributes + dbAutoIncrField If you're using DDL, the type is COUNTER. Click to expand...