Format report so values over X appear bolded

  • Thread starter Thread starter Al
  • Start date Start date
A

Al

Hi Everyone,
Newbie question here on reporting. I have a report that
displays times. What I'm trying to do this:

If fieldA = "Noon" then
if time <= 11:45:00 AM <BOLD>
if time >- 1:15:00 PM <BOLD>

If Field A = "Day" then
if time <= 7:45:00 AM <BOLD>
if time >= 6:15:00 PM <BOLD

Using a nested if statement, based on the value in field
A, bold all times which are either <=11:45:00 PM or >=
1:15:00 PM or >= 6:45:00 Am or >= 6:15:00 PM. I'm not sure
where to begin, where to place the statement (in the
textbox build?)
Any help would be graciously appreciated.

Thanks all!
 
You may want to give the conditional format a try. I
think it will do what you have expressed.
Whith the report open in design view and the textbox
selected click on the format dropdown menu and select
conditional formatting.
Hope this helps.
Fons
 
Thanks Fons, but quick question about that. When I do
this, it doesn't have a conditional format option, the
only options are the 7 that have to do with date (And yes,
it is a date field) Where else can I look for this field?

Otherwise, can I put some code in the Report Open -
section? This is what I have but it generates an error
2427 on the first line "you have entered an expression
that has no value"

If Me.DiscountCode = "noon" Then
If Me.Expr1 <= #11:45:00 AM# Or Me.Expr1 >= #1:15:00
PM# Then
Me.DiscountCode.BackColor = "RED"
End If
ElseIf Me.DiscountCode = "daytime" Then
If Me.Expr1 <= #7:45:00 AM# Or Me.Expr1 >= #6:45:00
PM# Then
Me!DiscountCode.BackColor = "RED"
ElseIf Me.DiscountCode = "Daytime room" Then
If Me.Expr1 <= #7:45:00 AM# Or Me.Expr1 >= #6:45:00 PM#
Then
Me!DiscountCode.BackColor = "RED"

End If

HELP! (Thanks Fons)
 
This is from an earlier posting, but it gives you the idea.
Detail Format event.
If DateDiff("d",[Next],Date) <= -7 OR DateDiff("d",
[Next],Date)<= 7 Then
Me![Next].BackColor = vbRed
Me![Next].ForeColor = vbWhite
Me![Next].FontBold = True
Else
Me![Next].BackColor = vbWhite
Me![Next].ForeColor = vbBlack
Me![Next].FontBold = False
End If
I do not quite follow your reasoning as far as using the
conditional formatting from the format menu. If you have
Access 2000 or later, you can use the control's Conditonal
Formatting property.
Select the Control, then Format + Conditional Formatting
Hope this gets you going.
Fons
 
Back
Top