« Reply #15 on: August 13, 2024, 11:27:25 am »
I found it.
I never selected the datasource in the DBlookupcombobox.
I am an idiot.
Ok, now that i can verify the entry exists, how do I show all the fields for that tracking number into a grid?
Many thanks
Peter
A successful "Locate" moves the cursor to THAT position.
Just access the other fields
Aircode!!
....
If MyBool Then Begin
Tedit42.Text:=dblookupcombobox3.DataSource.DataSet.FieldByName('SomeOtherField').AsString); //Or show it in a Label, Grid, wherever
end;
Or use a For-Loop running through the Dataset-Fields accessing by index
....
If MyBool Then Begin
For i:=0 To dblookupcombobox3.DataSource.DataSet.Fields.Count -1 Do Begin
Writeln(dblookupcombobox3.DataSource.DataSet.Fields[i].AsString); //Or show it in a Label, Grid, wherever
End;
end;
« Last Edit: August 13, 2024, 11:38:54 am by Zvoni »
Logged
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad