Conditional object visibility

way2bord

Registered User.
Local time
Today, 03:39
Joined
Feb 8, 2013
Messages
177
I have a table w/field: Number {1,2,3,4,5,6,7,8,9,10}
I have a report based on the table containing:

1 field: Number, box A and box B.

I would like for the report to show Box B if Number > 5, else show Box A.

How do I do this?:banghead:
 
Just figured it out at the same time you posted.

I kept sticking conditions into the on open of the report and it wouldn't recognize anything...
 
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.numbers > 5 Then
        Me.Box2.Visible = True
        Me.Box1.Visible = False
    Else
        Me.Box1.Visible = True
        Me.Box2.Visible = False
    End If
End Sub

Why do boxes show up in print preview, but not when Report View.
 
The detail format event does not fire in Report view. I lost a lot of hair on that one. :banghead:
 

Users who are viewing this thread

Back
Top Bottom