I have an ADOQuery qry1 which gets its ConnectionString programmatically. I need to add a Lookup field but, when I double-click the query, Delphi (7) complains there is no ConnectionString. So I need to code in the new field. I get as far as - I hope that's correct -
<code>
qry1.FieldList.Add('MyNewField');
with qryElect.FieldByName('MyNewField') do
begin
DataSet := qry1;
KeyFields := 'Affiliation'; ...
</code>
but then get stuck with defining the ListSource, ListField and DataField.
Much appreciate any help here with my edification.
Hannes
<code>
qry1.FieldList.Add('MyNewField');
with qryElect.FieldByName('MyNewField') do
begin
DataSet := qry1;
KeyFields := 'Affiliation'; ...
</code>
but then get stuck with defining the ListSource, ListField and DataField.
Much appreciate any help here with my edification.
Hannes