Subject Re: [IBO] How can I...
Author André Poisson
Thank you, Helen, (by the way the name of my 14 yar old girl also).
I would like to update the fields as sonn as possible. As an example, when the user enters a social insurance id, in a TIB_Edit field, I do a request on the database and if the id is present I pick up some values and assign them to different TIB_Edit fields, and some of those fields are IB_LookupCombo. So I would like to enter immediatly the value that was returned by my query in the TIB_LookupCombo.

I know that if I do the following:
IBLC_Langue.DataSource.Dataset.FieldByName('ITEMCODE').AsString := ParamByName('BEN_LANGUE').AsString;
The dataset of the LookupCombo for the lookup dataset will be updated with the new value
What I would like is the equivalent but to update the KeySource:
What could I put after IBLC_Langue.???.FieldByName('BEN_LANGUE').AsString := bla, bla, bla;
Does this make sense?
----- Original Message -----
From: Helen Borrie
To: IBObjects@yahoogroups.com
Sent: Monday, August 27, 2001 11:29 PM
Subject: Re: [IBO] How can I...


At 03:10 AM 28-08-01 +0000, you wrote:
>I have a LookupCombo but sometimes I know the value that should be in
>the field, so my question is how can I assign a value to the
>underlying field of the KeySource?

You can simply assign it in the AfterInsert of the dataset, or in the After Modify of the ib_row.

If you have a default value in mind, you could set that in the DefaultValue field property in the dataset editor or, at table level, in the DefaultValues property of the ib_connection.

hth
Helen

All for Open and Open for All
InterBase Developer Initiative · http://www.interbase2000.org
_______________________________________________________

Yahoo! Groups Sponsor



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



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