Topic: link text in edBarID (idnummer) with cbOperator in script
Hi, How should I link the text content in edBarID (idnummer) with cbOperator in script? The operators table field names are idnummer, first name, and last name. Thanks in advance.
My Visual Database → Script → link text in edBarID (idnummer) with cbOperator in script
Hi, How should I link the text content in edBarID (idnummer) with cbOperator in script? The operators table field names are idnummer, first name, and last name. Thanks in advance.
A little bit more details would help, we have no idea what you are talking about
Well, I mean the following. Data reference (idnummer) in the textbox must be fully displayed in the combobox (first name, last name, and idnummer. So in this case there are 3 table fields. Should the idnummer text with the correct row are linked. With best regards.
Hi again,
This code work.
procedure frmAddNewTest_edBarID_OnChange (Sender: string);
begin
///////////////////frmAddNewTest.cbOperator.dbItemID := frmAddNewTest.tgOperators.dbItemID ;
/////////////////SQLExecute ('select idnumber from operators where id = ('+inttostr(frmAddNewTest.tgOperators.dbItemID)+')');
frmAddNewTest.cbOperator.dbFilter := 'idnumber LIKE "%'+ frmAddNewTest.edBarID.Text +'%"';
UpdateDatabase('operators');
if frmAddNewTest.cbOperator.Items.Count = 2 then
begin
frmAddNewTest.cbOperator.DroppedDown:=False;
frmAddNewTest.cbOperator.ItemIndex := 1;
end else frmAddNewTest.cbOperator.DroppedDown:=True;
end;
-------------------------------------------------
But now when I close and reopen form I receive this error: Cannot focus a disabled or invisible window?
carlo_dj
I did not find any errors in this code.
Hi, the error dialog: Cannot focus a disabled or invisible window : is fixed. I remove SetFocus event. Thanks
My Visual Database → Script → link text in edBarID (idnummer) with cbOperator in script
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi