No more primary key

G

Guest

I have made previously that Inv.No. is a primary key, but later my clerks
said that there is no more message even the invoice number is duplicate. Than
when I see the table which is already in the Back End/Server. We see that
Invoicse No. is no longer a primary key, no more primary key in the invoice
table.

My question is, what caused it changed. Is it because I keep improving the
front end such as form and create the additional reports?

We need your help. Can anybody change it from the frontend, I think none of
my subbordinates understand well about the access.

Thanks in advance.

Frank
 
A

Allen Browne

Hi Frank

There are rare circumstances under which Access can remove the primary key
index. Typically this happens if a table becomes corrupt. When you run a
compact/repair, Access discovers that the index is corrupt. Instead of
removing the bad data (i.e. destroying records), it removes the primary key
index (not the field.)

When this happens, it creates a table that lets you know about the compact
error. You can tell when this occurred from the creation date of this table.

Solving the problem then means examining the table to locate the bad data,
and removing the bad record. You can then make the field the Primary Key of
its table again.

If there were relationships to other tables that depended on this field
being the pk, you will need to create those relationships again.

The original corruption is almost always the result of a failed write. For
details on how to avoid this situation, see:
Preventing Corruption
at:
http://allenbrowne.com/ser-25.html
 
D

David W. Fenton

There are rare circumstances under which Access can remove the
primary key index. Typically this happens if a table becomes
corrupt. When you run a compact/repair, Access discovers that the
index is corrupt.

I used to see this frequently in a couple of clients' databases
pre-Jet 4 SP6. Since then, none at all.
 

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