Error when trying to add primary key

A

Andreas

I have a table without a primary key. The table already contains six fields
with information, however it is not possible to use any/some of them as a
primary key, so I want to add a autnumber as a primary key. How do I do? I
try to add a new field but when I want to execute and save I get the error
message "There are no further fildelningslås". Fildelningslås is swedish and
my attempt to translate would be file sharing lock, but that is probably a
really bad translation. It also says that I have to increase these to be able
to add the field, how do I do that?

(Or is there some other way to add a automatic number primary key?)

Thanks!

Andreas
 
T

Tom Wickerath

Hi Andreas,

Based on your translation of the error message, it sounds this KB article
may be helpful for you. I've not heard of this being an issue when attempting
to add a new field, but perhaps if you have lots of records in this table
then you might run up against this issue.

"File sharing lock count exceeded…†error message during
large transaction processing
http://support.microsoft.com/?id=815281


If that still does not help, try copying just the structure of your existing
table. Then add the new autonumber field to this empty table and set it as a
primary key. Finally, use an append query to append records from your
existing table to this new table.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
J

Jerry Whittle

Just some guesses.

1 - If there are multiple users in the database, Access won't let you make
changes to the table unless you have it open exclusive.

2. There is already another autonumber field in the table.

3. There is already another primary key in the table, but you said that the
is not.

4. A corruption problem. Try doing a compact and repair.

5. You may have too many fields in the table and can't add any more. 255 is
the max limit; however, there are ways to run out way before that. Even then
it would be very hard to run out at 7 fields.

6. Adding a primary key might cause one or more records to exceed the 2,000
character limit.

7. Adding the PK could exceed the number of indexes. I think 32 indexes is
the limit. With only 7 fields, creating 32 indexes would be difficult.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top