Dynamically Setting Label Message

  • Thread starter Thread starter Lizzy
  • Start date Start date
L

Lizzy

Hi everyone,

I am trying to set a label on an Access Report to display
a message if a value in one of the fields is within a
range.
Like
if (txtAvg > 5) 'the txtAvg is really a calculated field
then display a message in a label

I know this is possible on a form but I was wondering if
it is possible on a Report?

Thanks for any help!!
Lizzy
 
You can use code in the On Format event of the section containing the
controls:

If Me.txtAvg > 5 Then
Me.lblAvg.Caption ="greater than 5"
Else
Me.lblAvg.Caption ="Not greater than 5"
End If
 
Back
Top