Conditional Label Caption (Report)

  • Thread starter Thread starter Bonnie
  • Start date Start date
B

Bonnie

Hi,

Does anyone know how I can make a label caption conditional upon the value
of a text box? This is on a report (actually a subreport). I tried to make
the caption:

=iif(subtotal>1500,12% Down,10% Down)

Got an error.

Thanks in advance.

Bonnie
 
Use the OnPrint event of the section where the lable is located in, and write
the code

If Me.subtotal > 1500 Then
Me.LableName.Caption = "12% Down"
Else
Me.LableName.Caption = "10% Down"
End If

Change the LableName to your lable name
 
Thank you Ofer. You are always a big help. I was putting it in the wrong
event.

Bonnie
 
Back
Top