Link to home
Start Free TrialLog in
Avatar of syllvia
syllvia

asked on

writing field values to a file

Hi,

I want to write the field values of a table to a RichEdit.
So far it iterates through the table and writes only the last field - I guess it writes every next field over the previous one - I tried to write an end of line marker with Writeln thinking it would act like pressing the Enter key.. (pathetic, eh)
What should I do??
Thanks!
s.


procedure TmfStyler.ToolButton1Click(Sender: TObject);
f: TextFile;
begin
  AssignFile(f, 'c:\OldTerms.txt');
  Rewrite(f);
  with tbOldTerms do
    begin
      First;
      while not EOF do
        begin
        RichEdit2.Text := tbOldTerms.FieldValues['WordA'];
        Writeln(f);
        Next;
        end;
    end;
   CloseFile(f);
end;
ASKER CERTIFIED SOLUTION
Avatar of jbshumate
jbshumate

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of syllvia
syllvia

ASKER

Thanks!!
s.