Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_ScripterSQL Script Generation and Processing

Public Sub FixAutonumberCol (
TableName As String,
dbs As DAO.Database,
Optional ForceFix As Boolean = False
)

Reset the AutoNumber seed value for the table.
For Access linked tables, a bug means that inserting to the Autonumber column resets the autonumber seed to the value following that inserted.
FixAutonumberCol() sets it back to MAX(autonumbercolumn) + 1

TableName as String

The table name

dbs as DAO.Database

The DAO database to which the table belongs

Optional ForceFix as Boolean = False

Force the fix even for non linked tables (it could be that the table is linked to a remote database and we are repairing it locally.

Call Template:

xf.Scripter.FixAutonumberCol TableName, dbs
xf.Scripter.FixAutonumberCol TableName, dbs, ForceFix

See Also:

Example 1:

FixAutonumberCol "tblProduct", dbs
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd