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 field text formating formula 1

Status
Not open for further replies.

Evil8

MIS
Mar 3, 2006
313
US
I have a report with ages of employees and dependants. How would I correctly write a conditional formula:

If dependant age ({@DepAge}) is greater than 26 and dependant relationship ({tbl.ClDependant.Relationship}) is not "SPOU" then FirstName, MiddleInit, LastName, Relationship, BirhtDate, Age and Gender are Bold and Red.

If {@DepAge) > 26 and {tbl.ClDependent.Relationship} <> "SPOU" then
{tbl.ClDependant.FirstName} and
{tbl.ClDependant.MiddleInit} and
{tbl.ClDependant.LastName} and
{tbl.ClDependant.Relationship} and
{tbl.ClDependant.BirhtDate} and
{@DepAge} and
{tbl.ClDepenant.Gender}

???? this is as far as I get. Nor do I know where I should really put this formula.

Thank you for all your help!
 
put the fields in the report.
right click on the item and select 'Format Field...'
click on the 'Font' tab
next to style, click the 'x+2' button and enter your formula with this change:
If {@DepAge) > 26 and {tbl.ClDependent.Relationship} <> "SPOU" THEN crBold
Repeat using the 'x+2' for Color:
If {@DepAge) > 26 and {tbl.ClDependent.Relationship} <> "SPOU" THEN crRed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top