Variable pictures?

Brand-X

Registered User.
Local time
Today, 18:26
Joined
Jul 15, 2002
Messages
11
is there a way to possibly do the following?

You have a small icon to represent a certain piece of data, lets say we have a picture of a bird and a picture of a turtle. On a report, could one set up a function to display a bird if a piece of data was say, 1, and a turtle if it were 0?

Data A = 1 -> Bird
Data A = 0 -> Turtle

You can do it with text, but how about a picture?

-Brandon
 
Just an idea but how about using the OnFormat event of the report to set the picture code? (Very much like setting the font etc. in an earlier post)
 
Hmm, could you maybe gimme a hand on that?
 
If the image is in the details section of the report, click on the details header bar and get the properties box to show. Now select Events and OnFormat. Click the three dot button and select code. You should then be taken to the VBA page and see something like:

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

End sub


Into this insert:

If me.NameoftextboxshowingDataA = 1 then
Me.NameOfImageBox.Picture = "C:\Restofpath\filename.gif"
else
Me.NameOfImageBox.Picture = "C:\RestofPath\OtherFilename.gif"
End If


HTH
 

Users who are viewing this thread

Back
Top Bottom