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

Formula to Change Font Color 2

Status
Not open for further replies.

TimothyP

Programmer
Aug 6, 2002
135
US
I have a report grouped my month similar to this...

Renewal Vendor
Date Name PO#
09/01/04 VendorA PO1
09/13/04 VendorB PO1
09/17/04 VendorC PO1
09/22/04 VendorD PO1

10/01/04 VendorE PO1
10/23/04 VendorF PO1
10/25/04 VendorG PO1

11/02/04 VendorH PO1
11/08/04 VendorI PO1
11/10/04 VendorJ PO1

12/02/04 VendorK PO1
12/09/04 VendorL PO1

How would I go about writing a formula to change the font color of my detail lines when the renewal date it current month and current month +1?

Thanks in advance for the knowledge.

Tim
 
Try:

If month({table.RenewalDate}) in
cdate(year(currentdate),month(currentdate),1) to dateserial(year(currentdate),month(currentdate)+2,1)-1

Looks about right...

I assumed that you meant month and year, not just the month alone.

-k
 
BTW, to use this right click the object and select format field->Font and th X 2 next to Color:

If month({table.RenewalDate}) in
cdate(year(currentdate),month(currentdate),1) to dateserial(year(currentdate),month(currentdate)+2,1)-1 THEN
CRRED
else
CRBLACK

-k
 
Yes, I did mean month and year.

When I check the formula it gives me the error message,
"A number range is required here" after in.

What did I forget?

Tim
 
I think the formula shoudl just be this:

If {table.RenewalDate} in
cdate(year(currentdate),month(currentdate),1) to dateserial(year(currentdate),month(currentdate)+2,1)-1 THEN
CRRED
else
CRBLACK

~Brian
 
Sorry, I'd started doing it the long way and forgot to remove the month portion.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top