How clear image block picture display when go to a different record via navigation bar

I have a form that has a listbox.  When a record is selected in the listbox an image appears in an image block.  But when I go to a different record via the navigation bar at the bottom of the form the picture display remains.  I want the image to not appear when I go to a different record.
SteveL13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
Are you saying that you want the image to go blank when you navigate to a new record or do you want it to show a different image related to the new record?  Using two different methods of navigation is what is causing the confusion.  Whatever code you are using in the click event of the listbox to populate the image has to also run in the Current event of the form when you move to a new record.
0
Rey Obrero (Capricorn1)Commented:
try clearing the control in the current event of the form

private sub form_current()
me.controlname=""

end sub
0
SteveL13Author Commented:
Pat: I have the same code in the oncurrent event as I do in the click event.

Rey:  That didn't work either.
0
Gustav BrockCIOCommented:
Set the Picture property:

    Me!YourPictureBox.Picture = "No image"

"No image" is localized, so read the value when the form is open and has no picture on display. Then replace "No image" above with that text.

/gustav
0
Jeffrey CoachmanMIS LiasonCommented:
FWIW,

In the sample I posed in your last Q, ...this code works OK for me:

    Me.Image9.Picture = ""
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.