PC Review


Reply
Thread Tools Rate Thread

Color coding based on time elapsed

 
 
Bill
Guest
Posts: n/a
 
      4th Feb 2009
I have a database that tracks calls for service. I want to have a main
screen which will show all open calls for service and auto refresh. The
trick is that as it refreshes I want to see a color change for the line item.
Example if the call is new, it can show green. After 7 minutes it turns to
yellow and after 10 minutes it turns to red. How can I use an event timer to
tiger these changes?

Thank you,

 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      4th Feb 2009
"Bill" <(E-Mail Removed)> wrote in message
news:F18CED4A-6BEB-4505-9426-(E-Mail Removed)...
>I have a database that tracks calls for service. I want to have a main
> screen which will show all open calls for service and auto refresh. The
> trick is that as it refreshes I want to see a color change for the line
> item.
> Example if the call is new, it can show green. After 7 minutes it turns
> to
> yellow and after 10 minutes it turns to red. How can I use an event timer
> to
> tiger these changes?


If this is a continuous form, you would probably need to use conditional
formatting, rather than attempting to change property values in a timer
event. You'd need to have a field in the record that stores the date/time
the call was opened. I haven't tried this, but given such a field, I think
you could use format expressions such as

DateDiff("n", [TimeOpened], Now()) >= 7

DateDiff("n", [TimeOpened], Now()) >= 10


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
Bill
Guest
Posts: n/a
 
      11th Feb 2009
Sorry it's been so long that I have not replied. Thank you for help me with
this. I see how you are comparing the time elements, however how would I
change the field property of the color based on the expiration of time? I'm
thinking:::

If DateDiff("n", [TimeOpened], Now()) >= 7 Then
Me.GeneralField.Back Color.65535
Else
Me.GeneralField.Back Color.16777215
End If

Then if this works, I need to refresh the screen every 30 seconds and update
the colors as appropriate.

Thanks for the help

Bill



"Dirk Goldgar" wrote:

> "Bill" <(E-Mail Removed)> wrote in message
> news:F18CED4A-6BEB-4505-9426-(E-Mail Removed)...
> >I have a database that tracks calls for service. I want to have a main
> > screen which will show all open calls for service and auto refresh. The
> > trick is that as it refreshes I want to see a color change for the line
> > item.
> > Example if the call is new, it can show green. After 7 minutes it turns
> > to
> > yellow and after 10 minutes it turns to red. How can I use an event timer
> > to
> > tiger these changes?

>
> If this is a continuous form, you would probably need to use conditional
> formatting, rather than attempting to change property values in a timer
> event. You'd need to have a field in the record that stores the date/time
> the call was opened. I haven't tried this, but given such a field, I think
> you could use format expressions such as
>
> DateDiff("n", [TimeOpened], Now()) >= 7
>
> DateDiff("n", [TimeOpened], Now()) >= 10
>
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>

 
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
Color Coding cell based on date (over a large range) Randy1360 Microsoft Excel New Users 3 29th Jan 2010 09:56 PM
Conditional formatting based on elapsed time Dan Robles Microsoft Excel Misc 3 20th Aug 2009 10:13 PM
COlor Coding specified time frames Kim Microsoft Excel Programming 1 22nd Jul 2008 03:03 AM
color coding based on date =?Utf-8?B?YWZ0M3JnbDB3?= Microsoft Access Form Coding 0 7th Jun 2007 01:54 AM
if statment based on elapsed time .. Jim in Arizona Microsoft ASP .NET 2 14th Dec 2006 07:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:09 PM.