If your idea is to get the user to edit the selected content in DBLookupComboBox
, this may not be possible since the purpose of this control is to list the data of a table as specified in the ListSource
property.
If this is what you want to do, maybe DBComboBox
might be better for this case.
What you can do to get around this is through the onClick
event of a button.
const
MSG1 = 'Digite uma nova espécie:';
MSG2 = 'Tem certeza que deseja gravar a espécie %s no banco?';
var
Entrada: string;
begin
Entrada := InputBox(Caption, MSG1, '');
if Length(Entrada) = 0 then Exit;
if MessageDlg(Format(MSG2, [Entrada]), mtConfirmation, [mbYes, mbNo], 0) = mrNo then Exit;
Tabela1.Append;
Tabela1.FieldByName('Campo1').AsString := Entrada;
...
You must bind the ListSource
property of DBLookupComboBox
to DataSource
of the desired table.