Same expression gets different results in Report and Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the expression pasted below in a Report as a text field and in a Query
as an expression. The report generates the correct results, but the Query
does not. I'm running a report that lists missing information from each
record. Am I not understanding something?

***Expression***
Personal Information: IIf(IsNull([Cell]),"Cell" & Chr(13) & Chr(10),"") &
IIf(IsNull([Home Phone]),"Home Phone" & Chr(13) & Chr(10),"") &
IIf(IsNull([Home Address]),"Home Address" & Chr(13) & Chr(10),"") &
IIf(IsNull([Home City]),"Home City" & Chr(13) & Chr(10),"") &
IIf(IsNull([Home State]),"Home State" & Chr(13) & Chr(10),"") &
IIf(IsNull([Home Zip]),"Home Zip" & Chr(13) & Chr(10),"") &
IIf(IsNull([Birthday]),"Birthday" & Chr(13) & Chr(10),"")

(In the sample below, "Cell" and "Home Phone" are missing from the record)
***Report Result***
Cell
Home Phone

***Query Result***
<null>
 
You might double check the names of the fields. Sometimes a report
will refer to a control on the report rather than the field in the
query. Are you certain that all the fields have the correct names?
I tried recreating your data below and got the right results - had to
expand the rows to see them though...
 
Back
Top