Solved Image Visibility based on a field (1 Viewer)

RevJeff

Registered User.
Local time
Today, 08:25
Joined
Sep 18, 2002
Messages
125
I have a simple database that is only used for printing labels. It pulls in a spreadsheet with three fields. Label Text, Label Barcode & Direction (Up or Down). Then prints out labels with the Barcode on top, the Label Text below and an arrow image to the right, either pointing up or down based on the Direction field.

The issue is I can't get the arrow part to work. I have both Up arrow, Down arrow images on the report and I want to have one visible and one invisible based on the Direction field.

Any help would be greatly appreciated.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:25
Joined
Oct 29, 2018
Messages
21,467
Hi. If you're using code, try it in the Detail section's Print event.
 

bastanu

AWF VIP
Local time
Today, 05:25
Joined
Apr 13, 2010
Messages
1,402
Assuming you have the controls in the Detail section of the report you can try to add code in the Format event of the Detail section:

Code:
If Me.Direction="Up" then
    Me.picArrowUp.Visible=True  'adjust for you arrow control names
    Me.picArrowDown.Visible=False
Else
    Me.picArrowUp.Visible=False
    Me.picArrowDown.Visible=True
End If
Cheers,
 
Last edited by a moderator:

Users who are viewing this thread

Top Bottom