Yes I tried that, but what happened was it deleted everything from my tables,
not just the one record being displayed on the form. I couldn't figure it
out, so now, the delete button deletes data from only one table. I've
reviewed my table relationships and everything seems in order. It's a
mystery.
Deleting a record on a Form based on a two-table query will delete the
record *on the Many side of the relationship*. Let's say you have a
table of CDs related one-to-many to a table of Tracks. If your form is
based on a query relating the two tables, you'll see one CD and only
one Track; deleting "the record" will delete that track, but it won't
delete the CD, because the CD has (or could have) other tracks which
would be left "orphaned".
You could have code which runs a Delete Query using a criterion from
the Form to only delete that one CD; if you have cascade deletes set,
doing so will first delete ALL the tracks (displayed or not), and then
the CD. The criterion would be something like
=[Forms]![mainformname]![ID]
where ID is the unique id from the "one" side table.
It may make it easier and less ambiguous if you do the standard thing
of using a Form for the "one" side table and a Subform for the "many".
Then you can explicitly delete from the subform - deleting a child
record, leaving the parent alone - or from the Form, deleting the
parent and all its children (again, with cascade deletes set).
John W. Vinson [MVP]