A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Conditional Format for Between Dates AND Another Criteria on a report



 
 
Thread Tools Display Modes
  #1  
Old August 11th, 2009, 05:19 PM posted to microsoft.public.access.gettingstarted
Lostguy
external usenet poster
 
Posts: 73
Default Conditional Format for Between Dates AND Another Criteria on a report

Hello!

My query:

EventDate
EventPeriodicity (in days)
DateDueateAdd("d",[EventPeriodicity],[EventDate])

So, for something that happens every year, it would look like 1/1/09,
365 (days), and DateDue 1/1/10.

On the report, I conditional format the DateDue field so that it is
shaded red if the item has exceeded its DateDue (Field Value is Less
than Date()), and shaded yellow if it is within 2 weeks of the DateDue
(Field Value is Between Date() and DateAdd("d",14,Date())).

The problem is that if EventPeriodicity = "0" (item does not repeat),
then DateDue is N/A. (The item only has to be completed once, so there
is no due date for the next time it should happen.)

How do i adjust the yellow for both conditions: a) Within 2 weeks of
DateDue AND b) EventPeriodicity"0" ??


Thanks for the help!

VR/Lost



I used Field Value Is between Date() and DateAdd("d",14,Date())
  #2  
Old August 11th, 2009, 07:15 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Conditional Format for Between Dates AND Another Criteria ona report

You will have to use the Expression Is option instead of the Field value is
option in the conditional formatting.

Expression is
[EventPeriodicity]"0" AND [DateDue] Between Date() and DateAdd("d",14,Date())

If EventPeriodicity is a number field instead of a text field then you will
need to remove the quote marks around the "0".

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Lostguy wrote:
Hello!

My query:

EventDate
EventPeriodicity (in days)
DateDueateAdd("d",[EventPeriodicity],[EventDate])

So, for something that happens every year, it would look like 1/1/09,
365 (days), and DateDue 1/1/10.

On the report, I conditional format the DateDue field so that it is
shaded red if the item has exceeded its DateDue (Field Value is Less
than Date()), and shaded yellow if it is within 2 weeks of the DateDue
(Field Value is Between Date() and DateAdd("d",14,Date())).

The problem is that if EventPeriodicity = "0" (item does not repeat),
then DateDue is N/A. (The item only has to be completed once, so there
is no due date for the next time it should happen.)

How do i adjust the yellow for both conditions: a) Within 2 weeks of
DateDue AND b) EventPeriodicity"0" ??


Thanks for the help!

VR/Lost



I used Field Value Is between Date() and DateAdd("d",14,Date())

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.