Subject | Re: [IBO] Problem with IB_LookupCombo |
---|---|
Author | Christoph |
Post date | 2003-04-04T13:40:19Z |
Thanks for the help. You were right with the first suggestion - the
query wasn't open. Doh.
It's working now, and so are two grids acting as master/detail. Now I
just need to figure out searching and I will have a complete
application...
Christoph
--- In IBObjects@yahoogroups.com, Norman Dunbar <norman.dunbar@l...>
wrote:
query wasn't open. Doh.
It's working now, and so are two grids acting as master/detail. Now I
just need to figure out searching and I will have a complete
application...
Christoph
--- In IBObjects@yahoogroups.com, Norman Dunbar <norman.dunbar@l...>
wrote:
> Sorry Christoph,they were
>
> I'm sending this again on the grounds that I was completely confused (or
> drunk) when I sent the previous version! At least I did say that
> *rough* notes. Thank goodness Helen is asleep or I'd be in serioustrouble
> by now :o)originally said)
>
>
> Black colour sounds like you have not opened the query/cursor associated
> with the dropdown. However, if this is not the case, then here are some
> rough notes from a little project of mine :
>
>
> A TIB_Query to select the code field and the description field from the
> appropriate table, ordered as desired. Call it qryLookup, set the SQL to
> 'select code_field, description_field from lookup_table order by
> description_field'. Add a TIB_DataSource (not dataset as I
> named dsLookup and link the two together using the data source's datasetsource -
> property.
>
> Set the TIB_LookupCombo's DataSource field to the above data source
> (dsLookup)
>
> Set the KeySource property on qryLookup to the 'main' query's data
> the one which has a code field for which you wish to show thedescription.
> (dsMain in my case).(qryLookup).
>
> Set the KeyLinksAutoDefine property to false on the query above
>FieldsVisible
> Set the KeyLinks property to the correct setting which needs to be
> 'lookup_table.primary_key=main_table.code_field' and there should be no
> spaces between the equal (=) sign and every thing else.
>
> Optionally set the code field to non-visible in qryLookup's
> property.using
>
> Open the lookup dataset when the form is being shown for the first time.
>
> [Optionally] refresh it as and when required.
>
> Close & unprepare it when the form is closed.
>
>
> The above works for me - provided I remember to specify the keylinks
> table and column names and NOT query names, and that I remember toopen the
> qryLookup as well :o)above and
>
> HTH
>
> Cheers,
> Norman.
>
>
> -------------------------------------
> Norman Dunbar
> Database/Unix administrator
> Lynx Financial Systems Ltd.
> mailto:Norman.Dunbar@L...
> Tel: 0113 289 6265
> Fax: 0113 289 3146
> URL: http://www.Lynx-FS.com
> -------------------------------------
> This email is intended only for the use of the addressees named
> may be confidential or legally privileged. If you are not anaddressee you
> must not read it and must not use any information contained in it,nor copy
> it, nor inform any person other than Lynx Financial Systems or theemail
> addressees of its existence or contents. If you have received this
> and are not a named addressee, please delete it and notify the Lynx
> Financial Systems IT Department on 0113 2892990.