My first bit of advice is : DO NOT use autoimcrement, especially on a primary key field. Consider the following scenario: the table header gets damaged, but the data, i.e. the records can be salvaged. You will need to create a new table and add the salvaged records. With autoincrement as a primary key, the inserted records will take on a new key value (based on the autoincrement) and links to the old detail tables will be wrong! If all records can't be salvaged, then the situation is worse.
To generate your own unique primary key in a multi-user environment create a one record control table (CONTROL.DB) which is shared by all. Write a bit of code to do the following when a user needs a new key value:
1. Attempt to open and place a full lock on the table.
2. If the lock can't be achieved, hold off for, say, 100ms and retry. Retry up to, say, 20 times. If you fail then, you should abandon with an error.
3. Place the table in edit mode, read the control value from the table, increment it, save it back to the record, exit edit mode, unlock the table and close it.
4. Use the retrieved value as the key.
A suitable control table can be made using 2 fields with a primary index on the table. The first field is a dummy field, (smallint), and set max value=1 and min value=1 in the table restructure box. (This will ensure that the table can only have one record!) The second field can be a longint type. Open the table and set the first field to 1 and the second field to whatever number you want to start with (2001??).