Recent

Author Topic: New value of TDBLookupComboBox;  (Read 1286 times)

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
New value of TDBLookupComboBox;
« on: November 13, 2018, 03:10:13 pm »
I have defined the following:
Code: Pascal  [Select][+][-]
  1.     CB_Supervisor: TDBLookupComboBox;
  2.  
When i do a Onchange Event i get the old value instead of the selected one when i do this
Code: Pascal  [Select][+][-]
  1.   if CB_Supervisor.KeyValue > 1 then....
  2.  



How do i get the selected value (which is the current one)?
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

gsa

  • New Member
  • *
  • Posts: 10
Re: New value of TDBLookupComboBox;
« Reply #1 on: November 14, 2018, 02:05:48 pm »
I have defined the following:
Code: Pascal  [Select][+][-]
  1.     CB_Supervisor: TDBLookupComboBox;
  2.  
When i do a Onchange Event i get the old value instead of the selected one when i do this
Code: Pascal  [Select][+][-]
  1.   if CB_Supervisor.KeyValue > 1 then....
  2.  



How do i get the selected value (which is the current one)?


if CB_Supervisor.Field.AsInteger > 1 then ...

 

TinyPortal © 2005-2018