Du hattest recht buffer hat den Wert Label und kann ihn daher nicht verareiten, aber nun kommt ja die frage, warum hat Buffer den Wert Label?
Ich stell mal die ganze Procedure rein, villeicht findet ihr ja den Fehhler, weil momentan kann ich ihn nicht orten.
Delphi-Quellcode:
procedure TForm3.Button1Click(Sender: TObject);
var lfdnr,buffer1 : integer;
var buffer,s,k : string;
begin
i := 1;
lfdnr := 0;
s := 'select LFDNR from teilnehmer';
query1.close;
Query1.Sql.Clear;
Query1.Sql.Add(s);
Query1.ExecSQL;
Query1.Active:=true;
Query1.First;
repeat
begin
lfdnr := lfdnr + 1;
while not Query1.Eof do
begin
buffer:= query1.Fieldbyname ('LFDNR').AsString;
buffer1 := strtoint(buffer);
if (buffer1 = lfdnr)then
begin
query1.Next;
end
else
begin
k := inttostr(lfdnr);
Form4.Label14.Caption := k;
end;
end;
end;
until Query1.Eof;
label7.Caption := inttostr(i);
Form5.Label18.Caption := Label7.Caption;
form4.visible := true;
if Checkbox1.Checked = true then Label6.Caption := 'LSM';
if Checkbox2.Checked = true then Label6.Caption := 'EH';
if Checkbox3.Checked = true then Label6.Caption := 'FreshUp';
if Checkbox4.Checked = true then Label6.Caption := 'EHT';
if Checkbox5.Checked = true then Label6.Caption := 'EH (BG)';
if Checkbox6.Checked = true then Label6.Caption := 'AKN';
if Checkbox7.Checked = true then Label6.Caption := 'SSD';
if Checkbox8.Checked = true then Label6.Caption := 'SHL';
if Checkbox9.Checked = true then Label6.Caption := 'SDL';
if Checkbox10.Checked = true then Label6.Caption := 'AED';
Form4.Label2.Caption := Label6.Caption;
Form4.Label6.Caption := Edit1.Text;
Form4.Label8.Caption := Edit2.Text;
Form4.Label18.Caption := Edit3.Text;
Form4.Label12.Caption := Label6.Caption;
Form4.Label20.Caption := Form1.Label5.Caption;
Form4.Label38.Caption := Form1.Label4.Caption;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
Form6.visible := true;
Form3.visible := false;
end;