By "orphaned records", do you mean:
A) records in the related table where the foreign key is null, or
B) records in the main table that have no matching records in the related
table.
A) is very easy. Just:
1. Create a query into the related table.
2. Drag the foreign key field into the grid.
3. In the Criteria row under this field, enter:
Is Null
4. Drag the * into the grid.
5. Check that the query is returning the correct records.
6. Change it to a Delete query (Delete on Query menu)
7. Run the query.
B) is more difficult. Access does not like deleting when there are multiple
tables and outer joins, so try a subquery.
1. Create a query into just the main table.
2. In the next column, type your subquery. This kind of thing:
EXISTS (SELECT MyForeignKey From MyRelatedTable
WHERE MyRelatedTable.MyForeignKey = MyMainTable.MyMainID)
3. In the Criteria row beneath this field, enter:
False
4. Drag the * into the grid.
5. Check that the query is returning the correct records.
6. Change it to a Delete query (Delete on Query menu).
7. Run the query.
In the end, the delete query will look something like this:
DELETE FROM MyMainTable
WHERE NOT EXISTS
(SELECT MyForeignKey From MyRelatedTable
WHERE MyRelatedTable.MyForeignKey = MyMainTable.MyMainID);