T
Tom Ellison
I've decided to air this issue publicly.
First, my definition: Key Merge is what you need when you have two
rows in a Foreign Table, one of which is logically a duplicate of the
other. Both Foreign Table rows are presumed to have dependent rows.
The user has selected one of these two rows to be deleted, and all the
dependent rows of that row must be made dependent on the row which is
to remain.
In order to initiate such an action, I suggest the user will be
required to select a the Foreign Table row which is to be retained,
what I'll call the Target Row. Let's just do this simply by having
the user navigate to the Target Row and click a Command Button that
will store the Primary Key value of that row for future reference.
Then the user should navigate to the Foreign Table row that is to be
deleted, what I'll call the Delete Row. The user would then click
another Command Button to delete this row and perform the Key Merge by
updating all the values in dependent tables.
Now, it has been increasingly clear to me lately that this
functionality is needed frequently. However, I've never heard it
discussed, nor do I recall seeing it published anywhere.
The query work is pretty straight forward, changing the references in
the dependent rows which are set to the Delete Row's key to be the
value of the Target Row's key. Then the Delete Row may be deleted
without disturbing referential integrity.
I invite comment on this topic, especially the following questions:
- Do you see a wide need for this functionality?
- Have you implemented it before? Seen it implemented?
- Do you know of any web sites, articles, or books that address this?
- Did I explain the topic so you can understand it?
Any comments are welcome.
Thanks,
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
First, my definition: Key Merge is what you need when you have two
rows in a Foreign Table, one of which is logically a duplicate of the
other. Both Foreign Table rows are presumed to have dependent rows.
The user has selected one of these two rows to be deleted, and all the
dependent rows of that row must be made dependent on the row which is
to remain.
In order to initiate such an action, I suggest the user will be
required to select a the Foreign Table row which is to be retained,
what I'll call the Target Row. Let's just do this simply by having
the user navigate to the Target Row and click a Command Button that
will store the Primary Key value of that row for future reference.
Then the user should navigate to the Foreign Table row that is to be
deleted, what I'll call the Delete Row. The user would then click
another Command Button to delete this row and perform the Key Merge by
updating all the values in dependent tables.
Now, it has been increasingly clear to me lately that this
functionality is needed frequently. However, I've never heard it
discussed, nor do I recall seeing it published anywhere.
The query work is pretty straight forward, changing the references in
the dependent rows which are set to the Delete Row's key to be the
value of the Target Row's key. Then the Delete Row may be deleted
without disturbing referential integrity.
I invite comment on this topic, especially the following questions:
- Do you see a wide need for this functionality?
- Have you implemented it before? Seen it implemented?
- Do you know of any web sites, articles, or books that address this?
- Did I explain the topic so you can understand it?
Any comments are welcome.
Thanks,
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts