Can you use OR in an IF statement?

Jon123

Registered User.
Local time
Today, 10:11
Joined
Aug 29, 2003
Messages
668
this is what I'm trying to achive.

If IsNull(Me.[oldoffset1]) Or (Me.[oldoffset2]) Or (Me.[oldoffset3]) Or (Me.[oldoffset4]) Or (Me.[oldoffset5]) Or (Me.[oldoffset6]) Or (Me.[oldoffset7]) Then


jon
 
If (IsNull(Me.[oldoffset1]) Or (Me.[oldoffset2]) Or (Me.[oldoffset3]) Or (Me.[oldoffset4]) Or (Me.[oldoffset5]) Or (Me.[oldoffset6]) Or (Me.[oldoffset7])) Then

...although, if you're actually trying to check for Nulls in any of those, you need to parse that separately.

If (IsNull(Me.[oldoffset1]) Or IsNull(Me.[oldoffset2]) Or IsNull(Me.[oldoffset3]) Or ...
 
You could, but make sure you apply condition to each field..
Code:
If IsNull(fieldName)[COLOR=Red][B] Or IsNull[/B][/COLOR](fieldName2) Then
 

Users who are viewing this thread

Back
Top Bottom