unit UMain;
interface
...
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
ListeFuellen(Self);
end;
procedure TForm1.DBListBox1Click(Sender: TObject);
begin
ListeKlick(Self);
end;
procedure TForm1.ListeFuellen(Sender: TObject);
var Help : TStrings;
begin
Help := TStringList.Create;
Form1.Table1.First;
while not Form1.Table1.Eof do
begin
Help.Add(Form1.Table1A01.Text);
Form1.Table1.Next;
end;
Form1.DBListBox1.Items := Help;
end;
procedure TForm1.ListeKlick(Sender: TObject);
var i : integer;
begin
Form1.Table1.DisableControls;
Form1.Table1.First;
for i := 0 to Form1.DBListBox1.Items.Count do
begin
if Form1.DBListBox1.ItemIndex = i
then
begin
Form1.DBEdit1.Text := Form1.Table1A01.Value;
Form1.DBEdit2.Text := Form1.Table1A02.Value;
Form1.DBEdit3.Text := Form1.Table1A03.Value;
Form1.DBEdit4.Text := Form1.Table1A04.Value;
Form1.DBEdit5.Text := Form1.Table1A05.Value;
Form1.DBEdit6.Text := Form1.Table1A06.Value;
Form1.DBEdit7.Text := Form1.Table1A07.Value;
Form1.DBEdit8.Text := Form1.Table1A08.Value;
Form1.DBEdit9.Text := Form1.Table1A09.Value;
Form1.DBEdit10.Text := Form1.Table1A10.Value;
Form1.DBEdit11.Text := Form1.Table1A11.Value;
Form1.DBEdit12.Text := Form1.Table1A12.Value;
Form1.DBEdit13.Text := Form1.Table1A13.Value;
Form1.DBEdit14.Text := Form1.Table1A14.Value;
end;
Form1.Table1.Next;
end;
end;
end.