title image


Smiley Re: Binärer Vergleich in Abfragen
Schreib dir einen kleinen Satz logischer Funktionen (ab) und verwende diese:



Public Function LAND(L1, L2)

If Not IsNumeric(L1) Or Not IsNumeric(L2) Then

LAND = Null

Else

LAND = CLng(L1) And CLng(L2)

End If

End Function



Public Function LOR(L1 As Long, L2 As Long) As Long

If Not IsNumeric(L1) Or Not IsNumeric(L2) Then

LOR = Null

Else

LOR = CLng(L1) Or CLng(L2)

End If

End Function



Public Function LNOT(L1 As Long) As Long

If Not IsNumeric(L1) Then

LAND = Null

Else

LNOT = Not CLng(L1)

End If

End Function



Public Function LEQV(L1 As Long, L2 As Long) As Long

If Not IsNumeric(L1) Or Not IsNumeric(L2) Then

LEQV = Null

Else

LEQV = CLng(L1) Eqv CLng(L2)

End If

End Function



Public Function LXOR(L1 As Long, L2 As Long) As Long

If Not IsNumeric(L1) Or Not IsNumeric(L2) Then

LXOR = Null

Else

LXOR = CLng(L1) Xor CLng(L2)

End If

End Function





Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: