a little thing that Delphi 4 broke

Here's a little thing that Delphi 4 broke --

When you have two lookup fields in a table, and the lookup tables associated
with those fields happen to be master-detail, it doesn't work right in D4.
It did in Delphi 3.

I have a table that lists members in a professional association. The table
has fields for employer ID and for facility ID, since  a given employer
could have multiple facilities. I use DbLookupCombos to display the two
fields. When the user selects an employer from the employer combo, what's
*supposed* to happen, since the facility lookup table is a detail to the
employer lookup table, is that now the facility combo only displays
facilities for that employer.

As I say, this worked fine in Delphi 3. But I was updating a couple of
things in the program, so I decided to move it to Delphi 4. The employer
lookup combo is OK, but the facility lookup combo now no longer displays
anything. Apparently, in Delphi 4 (and/or in the newer BDE), the lookups
happen before the master-detail relationship happens, so that when the user
drops down the facility combo, the facility lookup table (on the detail
side) is still trying to look up a facility for the previous master record
in the employer table. Unless the previous member just happened to have the
same employer, the facility table naturally finds nothing, so the facility
lookup combo is blank.

The fix is to use a TQuery for the detail lookup dataset instead of a
TTable, though I'm not sure why that should make a difference.