Expression

  • Thread starter Thread starter Meredith Mcgowan via AccessMonster.com
  • Start date Start date
M

Meredith Mcgowan via AccessMonster.com

In a report, how do I write the expression...
If 1, display HI, If 0, display nothing
 
In a report, how do I write the expression...
If 1, display HI, If 0, display nothing

Use an unbound text control.
Set it's control source to:

=IIf([SomeControl] = 1,"HI","")
 
Here are a couple of examples on how to do that. Hope this helps.
KB



Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If TotalPcs.Value = 0 Then
TotalPcs.Visible = False
PcsLBL.Visible = False
MailingCost.Visible = False
Else
TotalPcs.Visible = True
PcsLBL.Visible = True
MailingCost.Visible = True
End If
End sub

Also

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

If Total_Cost > Balance Then
Me.Bal.Caption = "Balance Due:"
End If
If Total_Cost < Balance Then
Me.Bal.Caption = "Credit Balance:"
End If

End Sub
 
Back
Top