A:='Category'; IF InputQuery('Input requested field:',A.Ref) THEN q:=TQuery.Create; q.DatabaseName:='DBDEMOS'; q.SQL:='SELECT * FROM Biolife'; q.Open; q.First; WHILE NOT q.EOF DO Caption:='Category:'+q.GetValue('Category'); Show(q.GetValue(A)); q.Next; END; q.Free; END;