How can I show or hide an image using an access table field?

E

evansc

I am trying to put a picture on a report and then use the boolean result
value of a field in an Access database to either show or hide it.
 
E

evansc

Tried puting a text control on the form and putting the picture in that box,
but do not know how to come it to look at the value in the table and based on
that value show or hide the image.

If there is a better way or simpler way, I am all ears
 
J

Jeff Boyce

It sounds like you want to see it when a different control has a certain
value.

If you added an Event Procedure to that other control's AfterUpdate event,
it could look something like (untested):

Me!YourPictureControl.Visible = (Me!YourDifferentControl = "whatever")

By the way, I don't know that pictures go in textboxes. Have you looked
into other types of controls?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

evansc

I started with the control then deleted it and just inserted the picture, but
there has got to be some way to control it's visibility through code. I am
showing a catalog of information based from a Access table. In that table
there is a yes/no field for OMRI. If the value is yes for that item, I want
the Omri picture I have to be visible, but if on the next item it is not,
then I want that picture hidden.

Look forward to your reply
 
J

Jeff Boyce

Did you look over my response about using the AfterUpdate event to add code
that tells the picture to be visible or not?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

evansc

Not sure where to put that code. But there is no, Update even that happens in
the report. The data from the report is being pulled from the table. Maybe I
am missing the whole picture here, and THAT IS POSSIBLE..LOL But, I can
insert a check box control, and set the control source to be that YES/NO
field and the check box works perfectly to show checked where the items are
checked in the table and not checked when the items are not. All I am trying
to do is make the report look better by showing the graphic instead of the
checkbox and text.
 
J

Jeff Boyce

What "report"? You posted in a "forms" newsgroup. Are you designing a
report?

If so, next time consider posting in the "reports" newsgroup -- you'll get
more folks looking at your question.

You could determine the visibility of the picture control using the value of
the other control by adding code to the Format event if you are designing a
report.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Top