Autor Beitrag
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Sa 28.09.02 15:15 
ich habe folgenden code:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
  if (form4.combobox1.text <> 'hh:nn') or (form4.ComboBox1.text <> 'hh:nn:ss') then
    begin
      messagedlg('Ungültiges Uhrzeit-Format!',mtwarning,[mbok],0);
      form4.combobox1.setfocus;
      exit;
    end;


Der compiler bringt keinen fehler, jedoch wird egal was ich in der combo-box stehen habe immer der Fehler ungültiges Uhrzeit format audgegeben...

ich weiss nicht mehr weiter

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Sa 28.09.02 15:31 
Hi Chatfix,

ist ja auch logisch.
Denn:
Wenn du 'hh:nn' stimmt die erste Bedingung,aber die zweite nicht --> Fehler
Wenn du 'hh:nn:ss' eingibst stimmt die zweite,aber die erste nicht --> Fehler

Also: ersetze das or mal durch ein and. :wink:
Dann kommt nur ein Fehler, wenn beide Bedingungen falsch sind.

Gruß
______________

Ex0rzist
Chatfix Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Sa 28.09.02 15:32 
achso ja.. thx hatte wohl nen denkfehler drin!!! Dane noachmal

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Sa 28.09.02 15:35 
Kein Problem. :wave: