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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Text in an IIf Statement 1

Status
Not open for further replies.

bethabernathy

Programmer
Jul 13, 2001
254
MX
Hi - Once Again... This forum is AWESOME. I have the following expression in a text box:

=IIf([IncidentDescription]=Null," ",[IncidentDescription])

Is there a way to set it so that If the "IncidentDescription" is not Null, then the title Incident Description appears prior to the data in the record. For Example:

Incident Description: Skied into a tree.
(Title) [IncidentDescription]

Thanks, Beth beth@integratedresourcemgmt.com
 
It's me again.

Use this:

=IIf([IncidentDescription]=Null," ","Incident Description " & [IncidentDescription])
 
Hi John: Thanks!! I tried that and now the title "Incident Description" appears at every record. I am thinking that if I set up the title in its' own text box using syntax that says:

=IIf([IncidentDescription]=Is Not Null, "Incident Description:")

But, of course, this isn't working. I don't think it likes the "Is Not Null". Any ideas?

Thanks Again, Beth beth@integratedresourcemgmt.com
 
Set it up exactly as the other one:

=IIf([IncidentDescription]=Null," ","Incident Description: ")
 
Hi - The title "Incident Description: " is repeating in each record even if there is no "IncidentDescription". That is why I am thinking that If "IncidentDescription" is not null then I want to see the title.

Do you know the syntax for "is not null" in a text box?

Thanks, Beth beth@integratedresourcemgmt.com
 
O.K. This is working, I think:

=IIf([IncidentDescription]>" ","Incident Description: ")

What a Pain! Thanks for your help.

Beth beth@integratedresourcemgmt.com
 
You could also try:

=IIf(IsNull([IncidentDescription]) or Len([IncidentDescription]) = 0," ","Incident Description: ")


 
Thanks for your AWESOME help. Much Appreciated. Beth beth@integratedresourcemgmt.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top