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

conditional text content

Status
Not open for further replies.

PortalMelt

Programmer
Joined
Oct 8, 2002
Messages
2
Location
US
I can't find how to do this.

(Note: I'm sure this syntax is all wrong, I don't know Access very much)
In my report I need to do something like :

IF (Before OH > 0) AND (([Before OH]+[OH Cost Calc])<0) DISPLAY &quot;OH&quot;, ELSE DISPLAY &quot; &quot;

and then this one:

IF (Before OH < 0) AND (([Before OH]+[OH Cost Calc])<0) DISPLAY &quot;COST&quot;, ELSE DISPLAY &quot; &quot;

How do I do this?

Thanks,
Jeff

 
Solved this myself with some help from another site.

For the record, here is the code:

=IIf([Before OH]>0 And [PROFIT]<0,&quot;OH&quot;,IIf([Before OH]<0 And [PROFIT]<0,&quot;COST&quot;,&quot;&quot;))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top