View Single Post
  #2  
Old February 15th, 2010, 04:22 PM posted to microsoft.public.access.tablesdbdesign
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Unexpected Delete

Do you have the tables joined in the Relationships Window? If so do you have
Referential Integrity enabled? If that answer is Yes, look just below the RI
check box and there are Cascade Update and ((shudder)) Cascade Delete. If
Cascade Delete is enabled and you delete a record, all related records are
also toast.

However it seems by your description that Cascade Delete wasn't on as you
didn't have RI enabled at first.

Are you sure that the record is actually missing? If you are joining the two
tables in a query with an inner join, a record won't be returned unless there
is a record in both tables. Also you are using autonumbers. It's possible to
'burn' an autonumber very easily. If you are just seeing gaps in the
autonumber sequence, that means nothing.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"oldblindpew" wrote:

I have a table with many existing records, and it uses an autonumber key. I
recently added another table for additional information that only applies to
some, not all, of the records in the first table. These tables have a
one-to-one relationship, and the second table's primary key is supposed to
match the first table's primary key.

I add records to the second table by selecting from the first table via a
combo box.

My question is: What could cause Access to delete the record from the first
table just because I delete the record in the second table?

Directional: I have heard the term "directional" applied to relationships,
but none of my reference books breathe a mumbling word on this topic.

Referential Integrity: At first I had NOT enforced referential integrity, so
in desperation I tried enforcing it, but it made no difference.

Thanks,
OldBlindPew