Text box problem

  • Thread starter Thread starter Chip
  • Start date Start date
C

Chip

Hi, I am new to ACCESS and i am building a report that i need a text box to
print "Call Me" if a field (Coord) of the query is blank or to print the
field (Coord) if the field (Coord) is populated.

I have tried the IIF statement:
IIF([Coord] is null, "Call Me", [Coord])
and it just is not working at all.

Is there a better way or am i not doing this IIf statement right???

Any help would be appreciated, and as always THANKS in Advance!!!

Chip
 
Chip said:
Hi, I am new to ACCESS and i am building a report that i need a text box to
print "Call Me" if a field (Coord) of the query is blank or to print the field
(Coord) if the field (Coord) is populated.

I have tried the IIF statement:
IIF([Coord] is null, "Call Me", [Coord])
and it just is not working at all.

Is there a better way or am i not doing this IIf statement right???

Any help would be appreciated, and as always THANKS in Advance!!!

Your statement looks fine if you use it in a query. In a Form/Report
ControlSource expression you might have to use the IsNull() function rather than
the SQL "Is Null". Simpler would be...

=Nz([Coord], "Call Me")
 
You should also check for an empty string. It is not handled by the Nz
function

IIF(Nz([Coord],0) or [Coord] = ""l, "Call Me", [Coord])

Rick Brandt said:
Chip said:
Hi, I am new to ACCESS and i am building a report that i need a text box to
print "Call Me" if a field (Coord) of the query is blank or to print the field
(Coord) if the field (Coord) is populated.

I have tried the IIF statement:
IIF([Coord] is null, "Call Me", [Coord])
and it just is not working at all.

Is there a better way or am i not doing this IIf statement right???

Any help would be appreciated, and as always THANKS in Advance!!!

Your statement looks fine if you use it in a query. In a Form/Report
ControlSource expression you might have to use the IsNull() function rather than
the SQL "Is Null". Simpler would be...

=Nz([Coord], "Call Me")
 
Back
Top