BillKilgore
Programmer
Steven,
I read the answer you provided kingosticks in his query 102-1051893 but
I'm unclear as to exactly how to apply it. My difficulty is identical to
his and I'm getting the same, '...field not found' error when the line
with the 'X' is encountered.
(I use the string, loc_bar_number, as a check point for a partial run before
it gets optmized in the Text statement.)
The table name: Bars.
The field name: barnumber.
procedure TfmBarInventoryInput.DBEdBarNumberChange(Sender: TObject);
Var loc_bar_number : string;
Begin
loc_bar_number := '0';
with ADOQBars do
begin
close;
SQL.clear;
SQL.Add('SELECT MAX(BarNumber) FROM bars');
Active := True;
open;
X loc_bar_number := FieldByName('BarNumber').AsString;
DBEdBarNumber.Text := loc_bar_number;
SQL.Clear;
close;
end;
End;
My status is also about the same as kingosticks, except he understood your answer, in that I havn't done any SQL for quite a while and, prior to this assignment, never in Delphi.
Thank you for your consideration.
Bill Kilgore