hi folgendes Problem:
Bei diesem Code bleibt immer das Programm stecken:
Delphi-Quellcode:
procedure TForm1.Button8Click(Sender: TObject);
begin
if combobox1.Text=''
then checkbox1.Checked:=false;
if combobox2.Text=''
then checkbox2.Checked:=false;
if combobox3.Text=''
then checkbox3.Checked:=false;
if (checkbox1.Checked=true)and(checkbox2.Checked=true)and(checkbox3.Checked=true)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('Kategorie').AsString=combobox1.Text) and (clientdataset1.FieldByName('MainProgramm').AsString=combobox2.Text) and (clientdataset1.FieldByName('Typ').AsString=combobox3.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
if (checkbox1.Checked=true)and(checkbox2.Checked=true)and(checkbox3.Checked=false)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('Kategorie').AsString=combobox1.Text) and (clientdataset1.FieldByName('MainProgramm').AsString=combobox2.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
if (checkbox1.Checked=true)and(checkbox2.Checked=false)and(checkbox3.Checked=false)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('Kategorie').AsString=combobox1.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
if (checkbox2.Checked=true)and(checkbox3.Checked=true)and(checkbox1.Checked=false)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('MainProgramm').AsString=combobox2.Text) and (clientdataset1.FieldByName('Typ').AsString=combobox3.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
if (checkbox1.Checked=true)and(checkbox3.Checked=true)and(checkbox2.Checked=false)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('Kategorie').AsString=combobox1.Text) and (clientdataset1.FieldByName('Typ').AsString=combobox3.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
if (checkbox2.Checked=true)and(checkbox3.Checked=false)and(checkbox1.Checked=false)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('MainProgramm').AsString=combobox2.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
if (checkbox3.Checked=true)and(checkbox2.Checked=false)and(checkbox1.Checked=false)
then begin
clientdataset1.First;
while not clientdataset1.Eof do begin
if (clientdataset1.FieldByName('Typ').AsString=combobox3.Text)
then begin
Listbox6.Items.Add(clientdataset1.FieldByName('Name').AsString);
clientdataset1.Next;
end;
end;
end;
end;
Bitte helft mir ich finde den Fehler nicht
Danke!
Delphi is ......... DELPHI!!