Subject | Re: [IBO] TIBOQuery: Master-Detail DBComboLookups? |
---|---|
Author | mitch_landor |
Post date | 2007-02-20T06:31:05Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
Mitch
>entry.
> At 04:24 PM 20/02/2007, you wrote:
> >Does the default Master Detail behaviour of datasets which auto
> >synchronise on common key field names also work with DBComboLookups?
> >
> >I want to select a master record in one combo, and automatically
> >filter the available rows for selection in a "child" combo. I can't
> >get this to work.
> >
> >How can I do this?
>
> You can't. Master-detail is the wrong kind of relationship to use
> TDBLookupCombo for (if that's what you meant...I don't know of
> "DBComboLookups"). They are incompatible.
>
> Use this control for *lookup* relationships: where you have a key in
> a set that links to a unique key in another set. In a sense, it's
> the "reverse" of master-detail. M-D has a single master and
> 0-to-many detail records. A lookup set has a single unique entry and
> 0-to-many records in the "requesting" set that could match a single
>Thanks. Got it.
> For example, you could use it in an address maintenance program. You
> main set has records for various different addresses that you store
> for some parent record. You have a field in this Address record
> called "AddressType" which is an integer pointing to a table
> AddressType. Your DBLookupCombo would have AddressType as its
> ListSource (the place where the list of choices comes from) and
> Address as its Datasource (the table that needs to choose an
> AddressType). The Datafield property of the DBLookupCombo would be
> AddressType in the Address record. The KeyField property would be
> the primary key of the AddressType table; and the ListField would be
> the Description field of the AddressType table, i.e. the one you want
> to display.
>
> Helen
>
Mitch