Make visible image based on data

b_bds

Registered User.
Local time
Today, 11:33
Joined
Jan 17, 2008
Messages
37
Hi

I have a table of participants for an event and I want to create the labels for them.

I created the labels but now I would like to make the labels more interactive.
I would like to make some picture visible or non visible depending on the data.

I tried to make this code :

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.[Langue préférée - Preferred language :] = "Français - French" Then
Me.FRA.Visible = True
Else
Me.FRA.Visible = False
End If
End Sub

Tried these after :
Private Sub Report_Filter(Cancel As Integer, FilterType As Integer)
Me.FRA.Visible = False
End Sub

Private Sub Report_Load()
Me.FRA.Visible = False
End Sub

All of them have no influence in the visibility of the image named FRA or ENG.

Can someone help me on this?

Thanks
Bruno
 
What are the names of the image files and where are they located and what version of Access are you using.

Simon
 
Hi
Image name is ENG for english picture and FRA for french picture. (I know it's not up to code but it is how it was setup)
[Langue préférée - Preferred language :] is the field were the data comes from. I can show it but it doesn't change the fact that the images don't change the visibility option.
I'm currently using Access 2010 on windows 7.

I could be just adding a check box under each picture but I can't seem to make the code run for each run of the labels.

Thanks
Bruno
 
I would suggest that if your report uses a query then:

ImageFile = iif(Lang=ENG,ENG.jpg,FRA.jpg)

On an Image Control with its Control Source =[ImageFile]

I don't how your database is set-up so I don't know where the images ar located or what type of image they are.

Simon
 

Users who are viewing this thread

Back
Top Bottom