Subject Re: [IBO] Drop down problems
Author Geoff Worboys
> I have a table called TICKET which has a field called excursion
> which is get from the EXCURSION table using a LookupComboBox. There
> is also a field called hotel in the ticket table which I'd like to
> inform using a LookupComboBox from the HOTEL table. But I don't want
> to show all the records in the HOTEL table, just the ones that have
> a field (zone) equal as the field in the EXCURSION table.

Thats better, I think I understand what you want now. This is what I
usually setup using two lookups and two lookup datasets - with a
master/detail relationship between the two lookup datasets.

So TICKET is the main dataset, on the form there are two lookups.

The first lookup is used by the user to select the EXCURSION and
associate it with the current TICKET.

The second lookup is used by the user to select HOTEL and associate it
with the current TICKET. To restrict the available selection of
HOTELs in the lookup dataset setup a master/detail between EXCURSION
(the master) and HOTELS (the detail) based on the zone field.

The HOTEL lookup MUST be the second in the tab sequence, since the
master/detail relationship will prevent any records being displayed
until an EXCURSION has been selected.

I recommend that you also setup special validation in the TICKET table
triggers to ensure that a record can only ever be posted if the
selected hotel has the same zone as the selected excursion.


Geoff Worboys
Telesis Computing