General discussion


Sequential Numbering in MS Access

By rhouse ·
I have a table with existing Job_Numbers.(17 Job numbers). Each month I will match this table with another new table via the serial number. For each new record, could be one or many, I want to apply a new sequential Job_Number. i.e. in this case start at Job_Number 18 then 19 etc. How can I do this? I am fairly new to Access so please be gentle! I hope this is clear. Many thanks.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by john.a.wills In reply to Sequential Numbering in M ...

The autonumber type would be right if you were starting out, but I am not sure how you can retain the numbers you have already assigned.

Collapse -

by rhouse In reply to

I thank John for his comments but unfortunately this does not help me.

Collapse -

by Ldyosng In reply to Sequential Numbering in M ...

Per Access Help:
For a new table that contains no records, you can change the starting value of an AutoNumber field that has its NewValues property set to Increment to a number other than 1. For a table that contains records, you can also use this procedure to change the next value assigned in an AutoNumber field to a new number.
Create a temporary table with just one field, a Number field; set its FieldSize property to Long Integer and give it the same name as the AutoNumber field in the table whose value you want to change: In Datasheet view, enter a value in the Number field of the temporary table that is 1 less than the starting value you want for the AutoNumber field. For example, if you want the AutoNumber field to start at 100, enter 99 in the Number field.
Create and run an append query to append the temporary table to the table whose AutoNumber value you want to change: Note - If your original table has a primary key, you must temporarily remove the primary key before running the append query. Also, if your original table contains fields that have the Required property set to Yes, the Indexed property set to Yes (No Duplicates), or field and/or record ValidationRule property settings that prevent Null entries in fields, you must temporarily disable these settings.
Delete the temporary table.
Delete the record added by the append query.
If you had to disable property settings in step 3, return them to their original settings.
When you enter a record in the remaining table, Microsoft Access uses an AutoNumber field value 1 greater than the value you entered in the temporary table.
Make sure to read the note at the end of the entry - it wouldn't fit here.

Related Discussions

Related Forums