IS null

J

Jean

Hello,

Can anyone tell me how to look at to fields that are null
and have a result.

So example

If fieldA is null and FieldB is null then "Other"
 
G

Gerald Stanley

In VB, this is
If ISNull(fieldA) And IsNull(fieldB) Then

Hope This Helps
Gerald Stanley MCSD
 
D

Duncan Bachen

Hello,

Can anyone tell me how to look at to fields that are null
and have a result.

So example

If fieldA is null and FieldB is null then "Other"

If IsNull([FieldA]) And IsNull([FieldB]) Then
^Do something here^
End If
-D
 
R

Rick Brandt

Duncan Bachen said:
Hello,

Can anyone tell me how to look at to fields that are null
and have a result.

So example

If fieldA is null and FieldB is null then "Other"

If IsNull([FieldA]) And IsNull([FieldB]) Then
^Do something here^
End If
-D

Based on the newsgroup I'm assuming you want this in a query, not VBA code.

IIf([FieldA] Is Null And [FieldB] Is Null,"Other","SomethingElse")

(you didn't say what the field should return when both fields are NOT
Null).
 
Top