If you feel like helping me one more time, I would appreciate it; I'm really
trying to understand this.
My continuous form is based on a query. The query is pretty
straight-forward with two tables joined so that I can use fields from each of
the tables on my form. Each record has its appropriate data displayed in the
correct fields; some data coming from one table and some data coming from the
'many' (or secondary) table.
On this continuous form, I have a delete button in the footer. If I click
delete, the record seems to go away in its entirety. However, when I close
the form and then re-open it, the record is back with its data from the
primary table. The data from the secondary table is gone.
Correct. By default, if you delete from a multitable query, only the
"manyest" table record is deleted. The assumption is that the subform
is displaying *one* active (selected) record from the "many" side
table, on the current row; and that it is *that* record you wish to
delete. Generally, if you had (say) an Orders form with 34 items on
the OrderDetails subform, a user would expect a button on a row of the
subform to delete THAT ITEM, not to delete the Order, all its
information, and all 34 items. It seems you wish for the button on the
subform to do just that - ok, so your needs are a bit unusual it
seems!
I have moved the delete button to a form that displays one record at a time.
In this form, the data for a particular record comes from three tables. If
I click delete, the delete cascades properly, removing all the records in all
tables that pertain to the record I am looking at.
Why not just move the button from the subform to the mainform, if it's
the mainform record that you're trying to delete? Or, you could use
the Click event of the button to execute a Delete query to delete
whatever it is that you want deleted.
John W. Vinson[MVP]