problem:
How to define the initial value and step value of the Auto Number field? How to define the initial value and step value of the field to add fields? How to make the start value of the automatic add field of the deleted data to start re-starting?
Reply:
With the following statement, you can specify its starting value and step value when you build a table:
Create Table TBLNeworder2 (ORDERID AUTOINCREMENT (1000, 10), itemid long, Quantity Long You can also modify the next start value and step value with the following statement:
Alter Table TBLORDER ALTER COLUMN ORDERID Counter (2000, 50) To start:
Alter Table Tablename Alter Column ORDERID Counter (1) In the VBE interface:
DOCMD.RUNSQL "ALTER TABLE TABLENAME ALTER Column ORDERID Counter (1, 1)" Here to note that the automatic number is often used as the uniqueness of the logo record, but the JET will change the automatic number with the DDL statement without guaranteeing the modification. The automatic number still remains unique, so the identification number repetition will appear. To avoid this, it is best to set the auto number to the primary key, or you cannot repeat. However, these operations require Jet 4.0. If you don't use the query or Jet SQL to refer to the animation in the following article http://access911.net/index.asp?board=4&recordid=77fab11e1adc How to use the query design wizard to build a query http://access911.net/EG/ How to run a piece of Jet SQL code http://access911.net/EG/swf/runsql.swf
Access911.NET Original article If you need to reprint, please contact the author and indicate the initial value and step value of the Auto Number field.