access advanced courses - primary key reduced start

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » access advanced courses - Primary key reduced start number

access advanced courses - Primary key reduced start number

resolvedResolved · Low Priority · Version Standard

Mark has attended:
Access Intermediate course
Access Advanced course
Access VBA course

Primary key reduced start number

Previously I asked for how to get a primary key with a high start number and sucessfully got the new database running from 3500. I have been developing and testing it, but now realise I need to start it at 2700. I have tried deleting all test records and putting a lower number by the same procedure as before but this doesn't work. It seems to be still acknowledging that there were records 3501 and upto 3520 still. ie next records will go from 3521. Due to there being about 40 fields to the table in question and some time consuming queries and forms dpendant off it (directly and indirectly) I feel uneasy about re-creating the table incase the queries don't recognise it. Any suggestions?

RE: Primary key reduced start number

Before making any changes to your database, I suggest that you make a copy of it and then try the fix on the copy. If you are successful, you can then apply it to the live database.

The following fix can be found here:
http://support.microsoft.com/kb/812718


You can reset an AutoNumber field value so it corresponds with one of the fields in the table. To do this, follow these steps:

1. Delete the AutoNumber field from the main table.
Make note of the AutoNumber field name.
2. Click Queries on the left pane. Double-click Create query in Design view on right pane.
3. In the Show Table dialog box, select the main table. Click Add and then click Close.
4. Double-click the required fields in the table view of the main table to select the fields.
5. Select the required Sort order.
6. On the Query menu, click Make-Table Query. Type the new table name in the Table Name text box and then click OK.
7. On the Query menu, click Run.
8. A dialog box appears with the text that follows: You are about to paste # row(s) into a new table. Click Yes to insert the rows.
9. On the File menu, click Close. Click No to close the Make-Table Query window.
10. Click Tables on the left pane. Right-click the new table and then click Design View.
11. In the Design view for the table, add an AutoNumber field with the same field name that you deleted in step 1. Add this AutoNumber field to the new table and then save the table.
12. Close the Design view window.
13. Rename the main table name. Rename the new table name to the main table name.


 

Access tip:

Relationship maps

It is important to create proper relationships between tables. You can use Access to help check your designs and evaluate them by printing them in graphical format to help with design purposes


Click on the Tools menu, click Relationships.
On the File menu, click Print Relationships. View or print as required

View all Access hints and tips


Server loaded in 0.1 secs.