Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF filter statement does not when No data is in a field. 1

Status
Not open for further replies.

MikeFL

Programmer
Jul 12, 2002
58
US
I’m working on an MS Access2003 database form where I have a “TEXT” filed named “CatCPIReqNos”. This field can contain data or not depending on the users input.

I have another field “unbound" named "Text391" that I have the following IIF statement (1) in that returns its IIF statement if field “CatCPIReqNos” contains NO data in it. But I want the IIF statement (2) to return its IIF statement if field “CatCPIReqNos” "HAS" data in and I can’t seam to make it work. Can someone please help me?

(1):
Code:
=IIf(IsNull([CatCPIReqNos]),"-> Please make sure that you put our above [TAR] No. in the Cat DSN “Request Detail” field for our future reference! 
",([CatCPIReqNos])=" ")
(2):
Code:
=IIf(IsNotNull([CatCPIReqNos]),"-> Please make sure that you put our above [TAR] No. in the Cat DSN “Request Detail” field for our future reference! 
",([CatCPIReqNos])=" ")

Note: Also when I try to use the IIF statement (2) I see the following error: #name# in the “Text391” field.
 
Hi
I think:
[tt]=IIf(Not IsNull([CatCPIReqNos]),"-> Please make sure that you put our above [TAR] No. in the Cat DSN “Request Detail” field for our future reference!
",([CatCPIReqNos])=" ")[/tt]
 
Remou: Thanks what you suggested worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top