Why am I getting this error message?

S

Stapes

Hi

I have a Contact record with Invoices linked to it by Account Code
field. In the process of 'merging", the Account Code on the linked
Invoices has been changed, linking them to the new Account Code. Then,
when I go to delete the original Contact record, I get this error
message:

The record cannot be deleted or changed because table 'TM_Invoice'
includes related records.

But it doesn't. What is going on?

Stapes
 
J

John W. Vinson

Hi

I have a Contact record with Invoices linked to it by Account Code
field. In the process of 'merging", the Account Code on the linked
Invoices has been changed, linking them to the new Account Code. Then,
when I go to delete the original Contact record, I get this error
message:

The record cannot be deleted or changed because table 'TM_Invoice'
includes related records.

But it doesn't. What is going on?

Stapes

You're getting this error message because TM_Invoice DOES contain related
records. Look again! Create a Query joining the two tables on the old account
code.

John W. Vinson [MVP]
 
S

Stapes

You're getting this error message because TM_Invoice DOES contain related
records. Look again! Create a Query joining the two tables on the old account
code.

John W. Vinson [MVP]

No. Categorically it does not. I have already changed the Account Code
in all the TM_Invoice records. This is the field the two tables are
joined on.
 
J

John W. Vinson

No. Categorically it does not. I have already changed the Account Code
in all the TM_Invoice records. This is the field the two tables are
joined on.

Did you have Cascade updates set? Are both the primary key and foreign key
values updated? Are there any OTHER tables with relationships on this field?

Try compacting the database, just in case there's a damaged index still
holding on to a value... also be sure that Name Autocorrect is turned off in
the database properties (before you compact).

John W. Vinson [MVP]
 
S

Stapes

Did you have Cascade updates set? Are both the primary key and foreign key
values updated? Are there any OTHER tables with relationships on this field?

Try compacting the database, just in case there's a damaged index still
holding on to a value... also be sure that Name Autocorrect is turned off in
the database properties (before you compact).

John W. Vinson [MVP]- Hide quoted text -

- Show quoted text -

Cascade updates is set. Only the foreign key values are updated, i.e.
the Invoice is now pointing to a different Contact. There are other
tables with relationships on this field, but there are no records in
either of them.
The delete works in some cases and not others.
Compact and repair makes no difference.
Still, it says there are related records when there aren't.
It is illogical.
 
S

Stapes

Cascade updates is set. Only the foreign key values are updated, i.e.
the Invoice is now pointing to a different Contact. There are other
tables with relationships on this field, but there are no records in
either of them.
The delete works in some cases and not others.
Compact and repair makes no difference.
Still, it says there are related records when there aren't.
It is illogical.- Hide quoted text -

- Show quoted text -

Sod this - I'll put Cascade deletes in. I should not need to. This
must be an access bug.
 

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