JOIN query: What happens when you delete a row?
- From: "Bob Bridges" <rhbridg@xxxxxxxxxxxxx>
- Date: Fri, 2 Mar 2007 23:44:19 -0600
Start with two tables, parent records in one and child records in the other,
a one-to-many relationship. Create a select statement joining the two.
Display the query in data*** mode. When I delete a row, only the child
record is deleted from the source tables; the parent record is still
there...which is what I wanted.
Now display fields from that query in a continuous form. When I delete a
record from that form, one of the child records AND THE PARENT record are
deleted -- definitely not what I wanted.
I have another query that could be described the same way, except in that
form when I delete a record only the child record is deleted from the
original tables. It doesn't seem to make any difference whether the join is
inner or outer, nor whether parent data is displayed in the detail section.
So here's the question: What determines the outcome? How do I write the
query, and/or design the form, to be sure that when I want to delete a child
record in the form, the parent record will survive? Are the rules for this
documented somewhere?
---
Bob Bridges, rhbridg@xxxxxxxxxxxxx, cell 336 382-7313
(hotel) 612 869-7704 xt 118, fax 612 869-7383
/* A crooked politician may be faithful to his wife, but a man who deceives
his own wife can't be relied on to deal honestly with the public. We have
been getting this backward lately. We've been assuming that you can have
public virtue without private virtue. -Joseph Sobran, 1998 */
.
- Follow-Ups:
- Re: JOIN query: What happens when you delete a row?
- From: paii, Ron
- Re: JOIN query: What happens when you delete a row?
- From: tina
- Re: JOIN query: What happens when you delete a row?
- Prev by Date: Re: Help on If statment function using a range to input a value in to a text box
- Next by Date: Re: Is it possible to make the MDB non-readable after a certain period?
- Previous by thread: Populate record with lowest match
- Next by thread: Re: JOIN query: What happens when you delete a row?
- Index(es):
Loading