Positioning for needed id in DBLookupComBox



  • Morning.
    Such a question:
    There's a table1 with three fields.

    «id» «last_name» «firm»
     1     Федотов   фирма №3
     2     Федотов   фирма №4
    

    with which data are collected DBLookupComBox
    In " List Field " and " Key Field " parametersDBLookupComBoxa field of "last_name " is established. Displacement DBLookupComBoxDBGrid Table 1 shows that the courseor is moving in notes (1 and 2).
    How to make a user choose a name like

    c "id" = 1, theor may have positioned on the selected record, with id = 1,
    or
    c "id" = 2, the courseor could be positioned on the selected record, with id = 2.

    Not just on the record, with id = 1?

    Now, when you choose different lines DBLookupComBox, positioning occurs at all times with id = 1.

    Thank you.



  • There was a response from the discussions.

    "KeyField" := 'last_name; ID'; 
    

    Key Field is a field to be delivered to Data Field




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2