Conditional Formatting

  • Thread starter Thread starter Té
  • Start date Start date
T

Té

Can you enter an expression on conditional formatting that will find
specified date ranges like between 1/1/01 and 1/2/02? How does the
expression have to be set up? I have Forms![frmCategories][Date]Between
1/1/01 and 1/2/01. But its not working.
 
Té,

Like this:
[Date] Between #1/01/2001# And #1/02/2001#

As an aside, note that 'date' is a Reserved Word (i.e. has a special
meaning) in Access, and as such should not be used as the name of a
field or control or database object.
 
I entered [Date] Between #1/01/2001# And #1/02/2001#
into my text box which is orderdate, but nothing returned back.
 
Té,

I thought you were talking about Conditional Formatting? I assumed you
meant you wanted to apply formatting options to a control on your form
or report based on the value of the Date field? If so, the expression
needs to be typed into the 'Expression Is...' box in the Conditional
Formatting dialog for the control you want to format. Is that what you
tried? Can you explain what you are trying to achieve?
 
On my form I have customer information and I have their order dates. On the
form anything that is between certain dates I want to appear in red. I know
there is some type of expression to set up, but I'm not sure how to write it.
 
Té,

What is the name of the field where you have the order dates?

What specifically do you want to show in red? The whole form?

What are the "certain dates"?
 
Té,

1. In design view of the form, select the control (you forgot to mention
what it is) that you want to be red.

2. Go to the Format|Conditional Formatting menu.

3. In the first Condition combobox, select 'Expression Is'.

4. In the textbox, type this expression:
[OrderDate] Between #1/01/2008# And #4/01/2008#

5. Use the formatting controls to make it how you want (you forgot to
say whether you want the text or the background to be red)

6. Click 'OK' to close the Conditiona Formatting dialog.

7. Open the form in Form View, and see if it has the desired result.
 
Hi Steve. I followed all of the steps and the conditional formatting is
still not working. I tried taking the # off also and it still didnt work.
 
Té,

This is "standard procedure", so the only explanation for "didnt work"
is that there is some detail we are overlooking.

Is the OrderDate field a Date/Time data type?

Do you actually have records where the value of the OrderDate field is
between the dates specified?

Which control(s) are you applying the Conditional Formatting to?
 
Back
Top