conditonal formatting when dates don't occur in desired order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

using a2k.

my form has two fields 'Onset' and 'Resolved' which are date fields. 'Onset'
cannot logically come after 'Resolved' nor can 'Resolved' come before
'Onset'.

for 'Resolved' my conditional format " Expression is [Resolved]<[Onset]"
which actuates a red background with bold yellow foreground text.

for 'Onset' my cond'l format "Expression is [Onset]>[Resolved]" which
actuates a red background with bold yellow foreground text.

here's the prob: i wanted both fields to react to the anomalous coding
situation but only the "Resolved" date does??

any theories?
 
typo maybe?

Strange that the formula would work for one, but not the other. You could
simply put the exact same formula for both fields. If the
[Onset]>[Resolved] will work even if you put it in the "resolved" field's
condition. As a matter of fact, your condition does not have to have
anything at all to do with the field you are in.

Rick B
 
i know i know but hey who wants to rock the boat. anyway, i took your
suggestion and pasted the 'Resolved' condition (which 'works') into the
'Onset' expression and guess what......no cigar :-(

Rick B said:
typo maybe?

Strange that the formula would work for one, but not the other. You could
simply put the exact same formula for both fields. If the
[Onset]>[Resolved] will work even if you put it in the "resolved" field's
condition. As a matter of fact, your condition does not have to have
anything at all to do with the field you are in.

Rick B



Ted said:
using a2k.

my form has two fields 'Onset' and 'Resolved' which are date fields. 'Onset'
cannot logically come after 'Resolved' nor can 'Resolved' come before
'Onset'.

for 'Resolved' my conditional format " Expression is [Resolved]<[Onset]"
which actuates a red background with bold yellow foreground text.

for 'Onset' my cond'l format "Expression is [Onset]>[Resolved]" which
actuates a red background with bold yellow foreground text.

here's the prob: i wanted both fields to react to the anomalous coding
situation but only the "Resolved" date does??

any theories?
 
Do you have something written in VBA in Form_Current that could be clashing with
your Conditional Formatting?


|i know i know but hey who wants to rock the boat. anyway, i took your
| suggestion and pasted the 'Resolved' condition (which 'works') into the
| 'Onset' expression and guess what......no cigar :-(
|
| "Rick B" wrote:
|
| > typo maybe?
| >
| > Strange that the formula would work for one, but not the other. You could
| > simply put the exact same formula for both fields. If the
| > [Onset]>[Resolved] will work even if you put it in the "resolved" field's
| > condition. As a matter of fact, your condition does not have to have
| > anything at all to do with the field you are in.
| >
| > Rick B
| >
| >
| >
| > | > > using a2k.
| > >
| > > my form has two fields 'Onset' and 'Resolved' which are date fields.
| > 'Onset'
| > > cannot logically come after 'Resolved' nor can 'Resolved' come before
| > > 'Onset'.
| > >
| > > for 'Resolved' my conditional format " Expression is [Resolved]<[Onset]"
| > > which actuates a red background with bold yellow foreground text.
| > >
| > > for 'Onset' my cond'l format "Expression is [Onset]>[Resolved]" which
| > > actuates a red background with bold yellow foreground text.
| > >
| > > here's the prob: i wanted both fields to react to the anomalous coding
| > > situation but only the "Resolved" date does??
| > >
| > > any theories?
| >
| >
| >
 
hi debbie,

here's what's happening in my On Current event for this sub-form

Private Sub Form_Current()
If Me.Continuing.Value = "Yes" Then
Me.Duplicate.Enabled = True
Else
Me.Duplicate.Enabled = False
End If
End Sub

but your concern's inspired me to re-think the way this "Onset" control's
set up.

the background color's 255 (red)!! the first conditional format of Onset's
is "Expression is [Onset] Is Not Null" which turns the background color white
leaving the bold black font alone.

the second (and last) conditional format for Onset's is the one that's "not
working" , "Expression is [Resolved]<[Onset]" which isn't turning the
foreground yellow over a red background.

i just tested out this fix which seems to have worked, i.e. i modified the
first one to read "Expression is [Onset] Is Not Null AND
([Resolved]>=[Onset])" which seems to give me what i was asking for.

thanks for the wake up call, deb :-)

have a nice day,

-ted
 
Ted,

Glad you figured it out. You never stated you had multiple conditional
formatting set. If you have multiple conditional formatting the order is very
important. Maybe you could have just switched the two conditions so it was
checking for [Resolved]<[Onset] first and then [Onset] Is Not Null.

Doesn't it feel good when the lightbulb goes on ... it does for me ... happy
dance!

Debbie


| hi debbie,
|
| here's what's happening in my On Current event for this sub-form
|
| Private Sub Form_Current()
| If Me.Continuing.Value = "Yes" Then
| Me.Duplicate.Enabled = True
| Else
| Me.Duplicate.Enabled = False
| End If
| End Sub
|
| but your concern's inspired me to re-think the way this "Onset" control's
| set up.
|
| the background color's 255 (red)!! the first conditional format of Onset's
| is "Expression is [Onset] Is Not Null" which turns the background color white
| leaving the bold black font alone.
|
| the second (and last) conditional format for Onset's is the one that's "not
| working" , "Expression is [Resolved]<[Onset]" which isn't turning the
| foreground yellow over a red background.
|
| i just tested out this fix which seems to have worked, i.e. i modified the
| first one to read "Expression is [Onset] Is Not Null AND
| ([Resolved]>=[Onset])" which seems to give me what i was asking for.
|
| thanks for the wake up call, deb :-)
|
| have a nice day,
|
| -ted
|
|
|
|
| "DebbieG" wrote:
|
| > Do you have something written in VBA in Form_Current that could be clashing
with
| > your Conditional Formatting?
| >
| >
| > | > |i know i know but hey who wants to rock the boat. anyway, i took your
| > | suggestion and pasted the 'Resolved' condition (which 'works') into the
| > | 'Onset' expression and guess what......no cigar :-(
| > |
| > | "Rick B" wrote:
| > |
| > | > typo maybe?
| > | >
| > | > Strange that the formula would work for one, but not the other. You
could
| > | > simply put the exact same formula for both fields. If the
| > | > [Onset]>[Resolved] will work even if you put it in the "resolved"
field's
| > | > condition. As a matter of fact, your condition does not have to have
| > | > anything at all to do with the field you are in.
| > | >
| > | > Rick B
| > | >
| > | >
| > | >
| > | > | > | > > using a2k.
| > | > >
| > | > > my form has two fields 'Onset' and 'Resolved' which are date fields.
| > | > 'Onset'
| > | > > cannot logically come after 'Resolved' nor can 'Resolved' come before
| > | > > 'Onset'.
| > | > >
| > | > > for 'Resolved' my conditional format " Expression is
[Resolved]<[Onset]"
| > | > > which actuates a red background with bold yellow foreground text.
| > | > >
| > | > > for 'Onset' my cond'l format "Expression is [Onset]>[Resolved]" which
| > | > > actuates a red background with bold yellow foreground text.
| > | > >
| > | > > here's the prob: i wanted both fields to react to the anomalous
coding
| > | > > situation but only the "Resolved" date does??
| > | > >
| > | > > any theories?
| > | >
| > | >
| > | >
| >
| >
| >
 
yes, i suppose it can be, debbie.
only one question remains: "happy dance"?

-ted

DebbieG said:
Ted,

Glad you figured it out. You never stated you had multiple conditional
formatting set. If you have multiple conditional formatting the order is very
important. Maybe you could have just switched the two conditions so it was
checking for [Resolved]<[Onset] first and then [Onset] Is Not Null.

Doesn't it feel good when the lightbulb goes on ... it does for me ... happy
dance!

Debbie


| hi debbie,
|
| here's what's happening in my On Current event for this sub-form
|
| Private Sub Form_Current()
| If Me.Continuing.Value = "Yes" Then
| Me.Duplicate.Enabled = True
| Else
| Me.Duplicate.Enabled = False
| End If
| End Sub
|
| but your concern's inspired me to re-think the way this "Onset" control's
| set up.
|
| the background color's 255 (red)!! the first conditional format of Onset's
| is "Expression is [Onset] Is Not Null" which turns the background color white
| leaving the bold black font alone.
|
| the second (and last) conditional format for Onset's is the one that's "not
| working" , "Expression is [Resolved]<[Onset]" which isn't turning the
| foreground yellow over a red background.
|
| i just tested out this fix which seems to have worked, i.e. i modified the
| first one to read "Expression is [Onset] Is Not Null AND
| ([Resolved]>=[Onset])" which seems to give me what i was asking for.
|
| thanks for the wake up call, deb :-)
|
| have a nice day,
|
| -ted
|
|
|
|
| "DebbieG" wrote:
|
| > Do you have something written in VBA in Form_Current that could be clashing
with
| > your Conditional Formatting?
| >
| >
| > | > |i know i know but hey who wants to rock the boat. anyway, i took your
| > | suggestion and pasted the 'Resolved' condition (which 'works') into the
| > | 'Onset' expression and guess what......no cigar :-(
| > |
| > | "Rick B" wrote:
| > |
| > | > typo maybe?
| > | >
| > | > Strange that the formula would work for one, but not the other. You
could
| > | > simply put the exact same formula for both fields. If the
| > | > [Onset]>[Resolved] will work even if you put it in the "resolved"
field's
| > | > condition. As a matter of fact, your condition does not have to have
| > | > anything at all to do with the field you are in.
| > | >
| > | > Rick B
| > | >
| > | >
| > | >
| > | > | > | > > using a2k.
| > | > >
| > | > > my form has two fields 'Onset' and 'Resolved' which are date fields.
| > | > 'Onset'
| > | > > cannot logically come after 'Resolved' nor can 'Resolved' come before
| > | > > 'Onset'.
| > | > >
| > | > > for 'Resolved' my conditional format " Expression is
[Resolved]<[Onset]"
| > | > > which actuates a red background with bold yellow foreground text.
| > | > >
| > | > > for 'Onset' my cond'l format "Expression is [Onset]>[Resolved]" which
| > | > > actuates a red background with bold yellow foreground text.
| > | > >
| > | > > here's the prob: i wanted both fields to react to the anomalous
coding
| > | > > situation but only the "Resolved" date does??
| > | > >
| > | > > any theories?
| > | >
| > | >
| > | >
| >
| >
| >
 
Back
Top