Subject IB_LookupComboBox help
Author Jack Mills
To date I have only used iboTDataset components & am trying to get into the real stuff but I am having problems & would appreciate some help with the IB_ lookup & other IB controls.

I have got the below ideas working using the iboTDataset components and the TDBLookupComboBox but this control uses different terminology e.g. ListSouce,ListField etc.

I have tried to follow some of the TIB code samples but when I apply the ideas in the sample code to my example it goes wrong, circular reference not allowed violation of PK's etc.

I have a Recipe table which basically stores information from other tables.
What I'm trying to achieve as an example.

Table Site_Recipes
PK Brand_ID , other fields Malt1_ID, Malt2_ID, Malt3_ID, Malt4_ID and fields from other tables.

Table Site_Malt_Types
PK Malt_ID, other fileds Malt_Type (name), Extract. There are 8 Malt_Types

Components used
TIB_Connection, TIB_Transaction
RecipeQuery select s.* from Site_Recipes s
RecipedataSource RecipeQuery
MaltQuery Select m.* from Site_Malt_Types m
MaltDataSource MaltQuery

4 off TIB_LookupCombo1 thru 4
DataSource MaltDataSource
KeyLinks m.MALT_ID=s.MALT1_ID (MALT2 ~ 4 etc)

TIB_Grid
DataSource RecipeDataSource
KeyLinks s.Malt1_ID (s.Malt2_ID etc)

TIB_NavigationBar DataSource RecipeDataSource
TIB_UpdateBar DataSource RecipeDataSource

Required results
When the user selects the Malt_Type in the 1st lookup the field Malt1_ID in the Grid should change & when posted the Site_recipe table should change = to Malt_ID in the Site_Malt_Types table, similarly if user selects the Malt_Type in the 2st lookup the field Malt2_Id should change = to Malt_ID

So far I have managed to get the 1st LookupCombo nearly working, using only 1 Lookup i.e. IB_Grid field Malt1_ID changes but when I try & post the changes I get a error message violation of PK on table Site_Recipes.
If I add all 4 lookups then all 4 always change Malt2_ID but I can post.

Obviously I am getting the cross connections confused and/or selecting the wrong links.

Thanks in advance for any help

Jack