On Wed, 2 Mar 2005 22:36:11 -0600, "Ted" <(E-Mail Removed)> wrote:
>John,
> Thanks but when I try to put your code snippet in the module, the value
>#20:00# changes to #8:00:00 PM#.
That is ABSOLUTELY IRRELEVANT.
THe value of #20:00# - what's actually stored in the table - is
0.83333333333333 (20/24 of a day). #8:00:00 PM# is another way of
depicting this time value. So is #8PM#.
>Allow to explain more....there is an option group with two radial buttons
"radio" buttons, from the old days when a car radio had five or six
station-select buttons, only one of which could be pushed.
>one labeled standard time and another labeled military time. Which ever
>option the user chooses toggles the format property of a text box which
>displays the current, which is updated using the timer event. When the time
>is between 7:30 am and 8:00 pm, I want the time color green. When the time
>is between 8:00 pm and 7:30 am I need the time color to be red. My issue
>lyes in determining the time range..it could be militray comparison or
>standard time comparison depending on the option choosen and the format set
>by the user. I appreciate your help.
You're mistaken. You're confusing data STORAGE with data DISPLAY. A
time value *is a time value* no matter how it's displayed. Your
previous post did not mention the time between midnight and 7:30;
given that additional constraint, try
If Time() >= #07:30# AND Time() < #08:00# Then
control.ForeColor = vbGreen
Else
control.ForeColor = vbRed
End If
John W. Vinson[MVP]
|