Subject RE: [IBO] Cannot get TIB_LookupCombo to work as expected .. I know its my fault!
Author Adrian Wreyford
Thanks Helen ..I did say you will have to be patient.

Remember, in IBO, datasets drive controls, not the other way around as in
the VCL model.


Link the TIB_LookupCombo's Datasource property to the TIB_Datasource of
your Location query.


Pick the field you want to display in the editbox part of the control as

Yep done

Everything else happens on the dataset of the Location query.

Well that is where I got to before posting this.

Now I need, to see the location once selected inserted into ANIMAL.

I'm using a form with many IB_Edits, and not a Grid to display records form
ANIMAL, with a IB_Update Bar

>How many IB_Queries do I need.?
>How do I set up the Master child relationship?

It's not a Master child relationship. It is what is referred to as a
KeySource/Lookup relationship.


>How does the loopupCombo know to insert the data into IB_QueryAnimal once
>the selection has been made .. I cannot find a way to bind it to ANIMAL.

It doesn't. You can't use a TIB_LookupCombo to implement a master-detail

Don't understand. You see I can use the VCL DBLOOKUPCOMBO, to insert values
from the lookup into the master.

I thought this is what you would use TIB_LOOKUPCOMBO for, or how else would
I get the data from a lookup list into the animal table.

>Just get it to display the lookup data, but with no effect on animal.

Please explain exactly what you want. The TIB_LookupCombo implements a
lookup relationship. That is, the primary key of the lookup table, e.g.
LocationID, points to a polling key in the main table - the "Keysource"
table - which is designed (by you) to point to the location. It can be that
many Animal records would point to the same LocationID through this lookup

If that is what you want to implement, then proceed like this with the
Location query object, assuming that the name of the key is LocationID.

Do as I described earlier with the Datasource and DisplayField properties
of the control.


For the KeySource property, select the Datasource (must be a
TIB_Datasource) that points to the main table.


For the KeyLinks property, type in


If you want the ability to type in some characters of the Location
description (the DisplayField) and have the mechanism find the key, set
KeySeeking true (I think it is the default, anyway).

Now, if you want to go further, and link up the lookup dataset's
description field, ie. the DisplayField, to a derived field in main
dataset, you use KeyDescLinks as well. There is more to this and I won't
waste space and time if you don't need this (i.e. you only want to use the
LocationID in the main dataset).



Lastly, if you want to, you can proceed to embed the lookupcombo in the
grid. To do that, select it and cut it out using Ctrl-X. Then, select the
grid by clicking in it, and do Ctrl-V to drop the control into the
grid. Then, when you run your program, the lookupcombo will appear in
place of the polling key field when that field gets focus in dssEdit or
dssInsert and you will be able to select a value for LocationID in the main

I don't want it on a grid.

I have a form and tab around to enter the data then post, and want to force
the user to use location for animal record from the location table, as one
would using a stinglist in IB_ComboBox.


[Non-text portions of this message have been removed]