Conditional Formatting - Embedded Subreport

R

rm

I cannot get the conditional formatting in an embedded report to
work.

There is no VBA involved.

The conditional formatting value (through the Access tool) is
"condition" - the value is "[dts]>= Date() - 7.

If the recorded date is new then seven days old then we want the text
bold. I can get the to work in a main report but not in the sub
report.
 
A

Allen Browne

What is dts?
Is it a text box? Or is there no text box for this field?
On the main report? Or on the subreport?

Unfortunately, you get no feedback with expressions in CF, so if something
is wrong, it makes it harder to track down. To help solve it, you might
temporarlily add a text box to the subreport and set its Control Source to:
=[dts]>= Date() - 7
to see what Access makes of the expression.

Also, make sure there are no compilation errors. Open any code window, and
choose Compile on the Debug menu.
 
R

rm

What is dts?
Is it a text box? Or is there no text box for this field?
On the main report? Or on the subreport?

Unfortunately, you get no feedback with expressions in CF, so if something
is wrong, it makes it harder to track down. To help solve it, you might
temporarlily add a text box to the subreport and set its Control Source to:
    =[dts]>= Date() - 7
to see what Access makes of the expression.

Also, make sure there are no compilation errors. Open any code window, and
choose Compile on the Debug menu.

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.




I cannot get the conditional formatting in an embedded report to
work.
There is no VBA involved.
The conditional formatting value (through the Access tool) is
"condition" - the value is "[dts]>= Date() - 7.
If the recorded date is new then seven days old then we want the text
bold. I can get the to work in a main report but not in the sub
report.- Hide quoted text -

- Show quoted text -

[dts] is the field name from the source table - not the text box name.
It is the source for a text box "fldDts". The text box is on a sub
report. "=[dts]>= Date() - 7" is plugged into the text box of the
Access tool used for conditional formatting (right click on a text box
- a little dialog box is displayed with an option to add 3
conditionals). I will try Debug>Compile but there is not any VBA
involved.
 
A

Allen Browne

You could try using the name of the control in the expressions rather than
the field name.

Even though there is no VBA code involved, there is a VBA function call to
Date().

The text box repeating the contents of the CF expression is worth a shot to
help debugging.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

What is dts?
Is it a text box? Or is there no text box for this field?
On the main report? Or on the subreport?

Unfortunately, you get no feedback with expressions in CF, so if something
is wrong, it makes it harder to track down. To help solve it, you might
temporarlily add a text box to the subreport and set its Control Source
to:
=[dts]>= Date() - 7
to see what Access makes of the expression.

Also, make sure there are no compilation errors. Open any code window, and
choose Compile on the Debug menu.




I cannot get the conditional formatting in an embedded report to
work.
There is no VBA involved.
The conditional formatting value (through the Access tool) is
"condition" - the value is "[dts]>= Date() - 7.
If the recorded date is new then seven days old then we want the text
bold. I can get the to work in a main report but not in the sub
report.- Hide quoted text -

- Show quoted text -

[dts] is the field name from the source table - not the text box name.
It is the source for a text box "fldDts". The text box is on a sub
report. "=[dts]>= Date() - 7" is plugged into the text box of the
Access tool used for conditional formatting (right click on a text box
- a little dialog box is displayed with an option to add 3
conditionals). I will try Debug>Compile but there is not any VBA
involved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top