Link to home
Start Free TrialLog in
Avatar of boc7900
boc7900

asked on

TClientDataSet.Lookup

What I'm doing wrong?

It doesn't work:

ACE := DBLookupComboBox1.Field.Text;//.Value;
co :=  ClientDataSet1.Lookup('CODI', ACE,'NOM');
 

And it works fine:

ACE := 'AAA';
co :=  ClientDataSet1.Lookup('CODI', ACE,'NOM');

The DBLookupComboBox1.Field.Text;//.Value contens AAA.

How can I pass the DBLookupComboBox1.Field.Value to the
ClientDataSet1.Lookup?

Thanks
Avatar of mocarts
mocarts

maybe:
co := ClientDataSet1.Lookup('CODI', DBLookupComboBox1.Text, 'NOM');

mo.
Avatar of Mohammed Nasman
change DBLookupComboBox1.Field.Text to DBLookupComboBox1.Text
ASKER CERTIFIED SOLUTION
Avatar of mocarts
mocarts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of boc7900

ASKER

It works fine.

Thanks
just for interest...
if it works fine, why grade B? ;)
mo. :)
Avatar of boc7900

ASKER

Sorry. I don't know the importance of grades. I qualified as good, because I thought excelent is an exceptional thing.

Next answer will be graded A if work.