PC Review


Reply
Thread Tools Rate Thread

Change color on date field in form for re-certification

 
 
messingerjc
Guest
Posts: n/a
 
      12th Apr 2010
Hello. I have two different date fields on a form, but I would like them to
change color depending on how close to the re-certification date it is
whenever I open the form or open a report showing the same info. On each of
the date fields, I would like to have them green for anything over a month
away, yellow for anytime within a month, and red for anything expired. One
date field [PTDate] needs re-certified every 6 months, and the other date
field [WeaponDate] needs re-certified every 12 months. I've been struggling
with this for several days now and haven't been able to figure it out. Any
help on this would be greatly appreciated! Thank you in advance!
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      12th Apr 2010
On Sun, 11 Apr 2010 20:55:01 -0700, messingerjc
<(E-Mail Removed)> wrote:

>Hello. I have two different date fields on a form, but I would like them to
>change color depending on how close to the re-certification date it is
>whenever I open the form or open a report showing the same info. On each of
>the date fields, I would like to have them green for anything over a month
>away, yellow for anytime within a month, and red for anything expired. One
>date field [PTDate] needs re-certified every 6 months, and the other date
>field [WeaponDate] needs re-certified every 12 months. I've been struggling
>with this for several days now and haven't been able to figure it out. Any
>help on this would be greatly appreciated! Thank you in advance!


Depending on your version of Access, you should be able to use Conditional
Formatting. Use an expression such as

DateAdd("m", 5, [PTDate]) > Date()

for green,

DateAdd("m", 5, [PTDate]) < Date() AND DateAdd("m", 6, [PTDate]) >= Date()

for yellow, and so on.
--

John W. Vinson [MVP]

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Gray field color to another color in a form Jugglertwo Microsoft Word Document Management 5 27th Oct 2010 10:14 AM
Change color on date field in form for re-certification messingerjc Microsoft Access Form Coding 3 18th Apr 2010 07:00 AM
Re: Form Field Font Color Change Cindy M. Microsoft Word Document Management 0 8th Dec 2006 05:38 PM
Field change color when a date is about to be due or is past due =?Utf-8?B?SmVzc2ljYQ==?= Microsoft Access VBA Modules 11 7th Jul 2005 09:54 PM
Change Form Field Background Color IE6 Larry Windows XP New Users 3 16th Sep 2003 02:02 AM


Features
 

Advertising
 

Newsgroups
 


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