Autor Beitrag
CyberStorm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WIN 98, WIN XP
D4 Prof, D6 Pers
BeitragVerfasst: Sa 11.01.03 17:59 
Hi,

Habe mal wieder eine Frage;

Ich habe folgenden Quellcode:
ausblenden Quelltext
1:
2:
3:
4:
5:
Tmp := DBLookUpComboBox2.KeyValue;
  If Tmp = DBLookUpComboBox3.KeyValue Then DBLookUpComboBox2.KeyValue := 0;
  If Tmp = DBLookUpComboBox4.KeyValue Then DBLookUpComboBox2.KeyValue := 0;
  If Tmp = DBLookUpComboBox5.KeyValue Then DBLookUpComboBox2.KeyValue := 0;
  If Tmp = DBLookUpComboBox6.KeyValue Then DBLookUpComboBox2.KeyValue := 0;


Kann man diese If Abfrage zu einer zusammenfassen. :?:
Sollte auch keine verschachtelte Abfrage werden.
Ich möchte sie mit 'or' Verknüpfen, aber es geht leider aus irgendeinem Grund nicht.

mfg
CyberStorm
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Sa 11.01.03 18:08 
Kann man, wahrscheinlich haste vergessen, die Klammern zu setzen:

ausblenden Quelltext
1:
2:
Tmp := DBLookUpComboBox2.KeyValue; 
 If (Tmp = DBLookUpComboBox3.KeyValue) OR (Tmp = DBLookUpComboBox4.KeyValue)  OR (Tmp = DBLookUpComboBox5.KeyValue) OR (Tmp = DBLookUpComboBox6.KeyValue) Then DBLookUpComboBox2.KeyValue := 0;


GRuß
CyberStorm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WIN 98, WIN XP
D4 Prof, D6 Pers
BeitragVerfasst: Sa 11.01.03 18:21 
Hi,

Danke :D

mfg
CyberStorm