"berni" said:
how do I change the autonumber to be 4 digits instead of
starting from 1..
In a new table I want the first record to start at 1000
and go from there.
Thanks in advance for your help
berni
Run an update query to insert a number 1 less than the required starting
number, so the value should be 999, and then delete this record. The SQL will
look like:
INSERT INTO tblName
(PKField) VALUES (999);
However, please note that the Autonumber field in an Access database should
have no meaning for the user - it should only be used as a means for the system
to uniquely identify records in a table. One of the main reasons for this is
that once allocated, an Autonumber cannot be reused, so you can get the
situation where a number is created, but never used for a record, and this
causes there to be a gap in the numbering of your records.
If you want to have more control over a unique incrementing number, then you
will need to create your own autonumber substitute, using the Form's
BeforeInsert event, and Nz/Dmax:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me!UniqueFieldName=Nz(DMax("[UniqueFieldName]","[TableName]"),0)+1
End Sub