Subject Re: IB_LookupCombo + KeyLinks
Author Andrei Luis
Hi Helen, thanks for your ideas. But I feel it is like use a cannon
to kill a moskito!!!

I will remove reference on KeyLinks to price, and use something like
this on ibLookupCombo.OnExit =

qrSales.FieldByName('salePrice').asCurrency :=

Thanks for your help,

--- In, Helen Borrie <helebor@t...> wrote:
> At 11:11 AM 1/07/2005 -0300, you wrote:
> >Hello again,
> >
> >I don't know if it is possible do what I need 'automatic'...
> >
> >My scenario: Form of Sales
> >I need bring up the product list price and feed the sale price
when I
> >choose a product at a IB_LookupCombo.
> >
> >I got a clue from Helen another day that was use KeyLinks
properties like
> >that:
> > Sale_Price=qrSalesItems.Price
> > Product_ID=qrSalesItems.Product_ID
> >
> >OK, that solved the problem. For a while... However, sometimes I
> >to change this sale price, increasing or decreasing it. And there
> >my problem: when I do this, the LookupCombo clear its value. That's
> >obvious I know, but how can I do this work like I need?
> Not with TIB_LookupCombo, since it is designed to automate the
linking of a
> value - usually a key value - to a static lookup. So, if you need
> override the stored price, then TIB_LookupCombo is not the solution
on its
> own.
> You could add a calculated field to the dataset, e.g.
> Calculated fields are, of course, not editable. Write OnCalcField
code to
> look for a value in an ordinary unbound edit box (labelled "Price
> Override"). If a value is there, apply it to the calculated field
and then
> clear the edit box. At BeforePost time, check the row for the
presence of
> a non-null 'PRICE_OVERRIDE' and, if found, apply that value to
the 'PRICE'
> instead of the regular value determined by the lookupcombo.
> That's only a suggestion. You might well come up with something
> Helen